Heat the oil in a flameproof casserole and gently fry the carrots, celery, garlic, onions and rosemary for 10 minutes, or until softened but not coloured.
Stir in the beans, passata, stock and sugar and bring to the boil. Then cover, reduce the heat and simmer for 25 minutes, or until the vegetables are tender.
Add the pasta and parsley and season to taste then simmer, covered, for a further 10-15 minutes until the pasta is al dente. Serve sprinkled with rosemary and Parmesan cheese.
Parmesan cheese is not truly vegetarian, as it contains animal rennet. To make this dish 100% vegetarian, omit the cheese or find a suitable vegetarian substitute made without animal rennet. In supermarkets look for the 'parmesan style hard cheeses' which are suitable for vegetarians.