Preheat oven to 325 degrees F.
Finely chop the onion and garlic. Heat the oil in a pan and add the onion and garlic. Cook until beginning to brown around the edges.
Add the spices, cook for a few minutes, then add the other ingredients except the beans. Bring to a boil. Once boiling, carefully spoon in the cooked beans.
Brush a casserole dish with a little olive oil before adding the bean mixture.
Bake for 45 minutes.