Peel, wash and cut the sweet potatoes into large pieces and cook them in boiling salted water for about 20 minutes. Rinse beans in a sieve and drain. Peel, wash and slice carrots. Clean, wash and slice the celery finely. Peel and finely dice onions and garlic.
Heat the oil in a large pot. Fry the minced meat for 5-8 minutes until crumbly. Season with salt and pepper. Add carrots, celery, onions and garlic and fry for about 5 minutes. Add tomatoes, bring to the boil and chop a little. Stir in 1 teaspoon each of thyme and rosemary and simmer for about 10 minutes. Stir in the beans. Season bolognese with salt and pepper.
Preheat oven (electric cooker: 200 °C/circulating air: 180 °C/gas: see manufacturer). Coarsely grate the cheese. Drain sweet potatoes and mash with a potato masher. Stir in cheese. Pour Bolognese into an ovenproof dish. Spread sweet potato puree on top. Bake in a hot oven for about 15 minutes.