For the gratins, peel the garlic and chop very finely. Grate the cheese. Mix sour cream, cream, garlic and about 3⁄4 cheese. Season with salt and pepper. Peel, wash, thinly slice or slice the potatoes. Mix with the cream mixture. Layer in four greased gratin dishes (each containing approx. 150 ml) or a large casserole dish, sprinkle with the rest of the cheese. Bake in a preheated oven (electric cooker: 200 °C/circulating air: 175 °C/gas: see manufacturer) for 40-50 minutes.
For the meatballs, soak the toast in cold water and squeeze it out. Mix minced meat, toast, egg, mustard and ajvar. Season with about 1 teaspoon salt, pepper and paprika. Form 8 meatballs from the mixture with moistened hands. Heat 2 tablespoons of oil in a large frying pan. Fry the meatballs for 4-5 minutes on each side.
Wash the tomatoes. Peel onion, cut into rings, turn in flour. Tap off excess flour lightly. Heat 1 tablespoon of oil in a second pan. Fry the onion rings until golden brown. Take them out. Add tomatoes to the frying fat and season with salt and pepper. Cover and braise for 5-7 minutes, tossing from time to time.
Remove small potato gratins from the edge and carefully turn them over onto plates. Serve with meatballs, tomatoes and the fried onions.