Heat the olive oil. Fry the onion over medium heat until soft, glossy and beginning to colour, about 6–8 minutes.
Add garlic and cook 30–60 seconds, until fragrant.
Add tomatoes, allspice, black pepper and half the salt. Cook 8–12 minutes until saucy. If using tomato paste, fry it for 1 minute before adding tomatoes.
Add beans and turn thoroughly through the sauce.
Cover and cook on low for 40–50 minutes, stirring occasionally, until very tender. Add a splash of water only if the pan becomes dry.
Uncover and reduce until glossy rather than watery. Taste and adjust salt.
Serve warm or at room temperature. The flavour improves after resting.