Heat oven to 220C/200C fan/gas 7. Bring a pan of salted water to the boil, add the turnips and cook for 6 mins until just tender, then drain.
Meanwhile, melt the butter in a frying pan over a medium heat. Fry the onion for 5 mins, then tip in the bacon and cook for a further 8 mins until it is crisp and the onions are golden. Stir through the thyme.
Lightly butter a medium, overproof casserole dish. Cover the base with half the turnips, then spoon over half each of the onion mixture, crème fraîche and cheese. Season, then repeat the layers. Bake in the oven for 25 mins until bubbling and deeply golden. Leave to stand for 5 mins, then serve with a green salad and some cornichons.