Put the ricotta in a sieve lined with a piece of muslin, set over a bowl. Put in the fridge and leave to drain for a couple of hours – you want it to drain enough so it’s no longer ‘wet’.
Put the flour, cornmeal, ½ tsp salt, baking powder, bicarb and sugar in a bowl. Add the butter and rub it into the dry ingredients, as if you were making pastry. Make a well in the centre, pour in the buttermilk and, using a knife, gradually mix together. You should end up with a soft dough. Crumble over the ricotta and mix into the dough.
Turn the dough out onto a lightly floured surface and, using your hands, shape it into a rectangle, about 20 x 15cm. Fold the top third into the middle, then do the same with the bottom third. Press the mixture into a 20 x 15 rectangle again, and repeat the process two more times. You should end up with a dough that’s about 2.5cm thick. Wrap and chill for 20 mins.
Heat the oven to 180C/160C fan/gas 4. Put the tomatoes in a baking dish (about 20 x 30cm) with the corn kernels. Add the vinegar, some seasoning and 1½ tbsp oil, and toss to coat. Set aside.
Heat the remaining oil in a frying pan over a medium heat, and cook the onions until golden and soft, about 12 mins. Add the garlic and cook for a few minutes more, then add the thyme and some seasoning. Spoon the onion mixture over the tomatoes and corn.
Lay the dough on a lightly floured surface and cut into rough circles or squares using a knife. Arrange the dough shapes over the veg, leaving some space between them. Sprinkle with the parmesan and bake for 45 mins until golden and bubbling (you should be able to see the tomatoes bubbling up from underneath the cobbler topping). Leave to cool a little – the tomatoes will be very hot when they come out of the oven – then serve.