Heat oven to 180C/fan 160C/gas 4. Heat the oil in a large pan or wok, add onions, then fry for 5 mins until golden. Add pumpkin, parsnips and garlic and cook for a further 3 mins. Stir in beans, tomatoes, wine, stock, thyme, sugar and plenty of seasoning. Bring to the boil, then transfer to a large casserole dish, pressing the beans and vegetables beneath the liquid.