For cooking the beans:
Soak the dried beans in plenty of cold water overnight.
The next day drain the beans, put them into a pan and cover with cold water (about 4-5 cm above the beans level). Stud the onion with the clove and add to the pot with the carrot and the herbs if using. Put the lid on and bring to the boil on a medium heat and then simmer for a minimum of 1.5 hours or until the beans turn soft skimming the surface from time to time from any impurities. Season with salt 10 minutes towards the end of cooking.
Discard the onion, carrot (and herbs) and leave the beans in the cooking water.
Melt the butter in a pan and add the chopped onion. Fry it on a medium heat until it starts turning lightly golden in colour. Add the diced pancetta or bacon and carry on frying stirring occasionally until both pancetta and onion turn golden in colour and some of the fat has melted. The longer you fry the pancetta for the more flavoursome the dish will become.
Drain the beans reserving some of their cooking liquid.
Add the beans to the pan along with a couple of tablespoons of the reserved liquid after cooking the beans. Stir and cook everything together adding more liquid if needed for about 5-10 minutes. Some of the bean grains will break and thicken the sauce making it more creamy.
Taste and season with salt and pepper.
Garnish with freshly chopped parsley leaves. Serve warm.