1: The day before cooking, put 700 g white beans to soak in a bowl of water.
2: Next day, boil in salted water until soft (it is normal for froth to form on the top to begin with; just skim it off).
3: Drain the beans. Preheat the oven to 390°F (200°C).
4: In a large pan (this could be the same as used to cook the beans), heat 4 tablespoons olive oil over medium heat. When good and hot, add 1 red onion chopped, 1 sprig rosemary, 1 bayleaf and 1 garlic clove. Salt, pepper and mix well. Cook while stirring for 1 or 2 minutes.
5: Add 300 g peeled and chopped tomatoes, mix and turn down the heat, Leave to thicken for 5 minutes.
6: Add the beans and mix in.
7: Transfer the mixture to a buttered gratin dish.
You can use a bouquet garni instead of the rosemary and bayleaf. For a heartier version, add an extra 50 g of grated cheese to the beans with the tomatoes.