For the tomato sauce, heat the olive oil in a frying pan and fry the onion for 5-7 minutes.
Add the whole garlic cloves and cook for about one minute. Season with salt and freshly ground black pepper.
Add the chopped tomatoes and the stock. Let the mixture simmer and reduce for about 40 minutes. You may wish to add more stock and let it boil for longer, or add further seasoning, according to taste.
Preheat the oven to 180C/350F/Gas 4.
For the polpettone, mix the onion, parsley, carrot, parmesan, mince, one egg and garlic. Season with salt and freshly ground black pepper.
Add another egg and mix by hand. Form the mixture into a rectangle, placing the slice of ham along the centre.
Heat the olive oil in a frying pan. Beat the last egg, then coat the polpettone in the beaten egg and the breadcrumbs and sauté in the olive oil until brown on all sides, about 10-15 minutes.
Put the polpettone in a deep baking tray, pour the sauce over the top, season with salt and freshly ground black pepper to taste and cook in the oven for 30-40 minutes. To see if the meatloaf is cooked, insert a knife into the centre. If the juices run clear, it is ready. Serve.