Perhaps your new favorite bean dish:
Soak beans in water for 24 hours, then cook together with one onion. Chop the other onion into small pieces. Sauté in hot oil. Fill a gratin dish with layers of beans and onions, adding some of the bean water until the dish is one-third full.
Season each layer. Bake in the oven at 200 °C until the water is absorbed.
Serve with minced meat.