Preheat oven at 350 Fahrenheit (180 degrees Celsius).
Drain and rinse the beans and boil in water for about 40 minutes to an hour, until they are soft but not mushy. Make sure you boil them enough; otherwise the beans will be too hard to eat even after baking.
In the meantime prepare the sauce. Sauté the onion in a bit of olive on low heat until soft and add the garlic cloves whole. If you want a stronger garlic flavor you can mince the garlic.
Add the tomato (this time I used cherry tomatoes that I cut in thin slices, but the traditional way is grating the tomato), the tomato paste, parsley, salt and pepper to taste and about ¼ cup olive oil. Let it simmer until sauce thickens, about 10 minutes.
Once the beans have boiled, drain them and put them back into the pot, add the sauce and mix gently. Pour the mixture in a pan and spread evenly and then pour about another ¼ cup olive oil over the beans and bake for about 40 minutes until beans are tender.