For bean layer:
Place the first 7 ingredients in a food processor and puree until fairly smooth. Add the egg, salt and pepper to taste.
Put the mixture in a bowl, cover and set aside.
For cheesy vegetable layer:
Cook the sweet potatoes and turnips in a boiling salted water for 20-25 minutes until tender. Don’t worry if the turnips are tough a little – it is OK.
Meanwhile, heat the oil in a small saucepan over medium-high heat. Add the onions, celery, stirring for a few minutes. Add salt and pepper, turn the heat down to medium. Place a lid on the pan, leaving it slightly ajar, and cook for 10 minutes.
Remove the lid, turn the heat up to medium-high and cook for 10 minutes more until silky and pale gold in color, stir occasionally. Turn off the heat and move the saucepan to the countertop.
Drain the potatoes and turnips. Mash, add grated cheese, stir it up until cheese is almost melted. Add onion and celery mixture. Place in a medium bowl and let it cool slightly.
Add the egg, corn flour, Worcestershire sauce. Season to taste.
Transfer half of cheesy vegetable mixture to a small ovenproof dish (I use 15x20cm (6x8 inch) dish). Place bean mixture on top. If it is dense a little, make small thin patties and cover the vegetable mixture. Top with remaining cheesy vegetable mixture. Sprinkle with 30g grated Cheddar cheese.
Bake for 25 minutes in a preheated oven at 180C (350 F). Place under a hot grill for 3-5 minutes until the topping is a golden brown colour.