Heat the olive oil in a large saucepan. Add the garlic and onion and cook over moderately low heat until softened, about 6 minutes. Add the tomatoes and cook over moderate heat until softened, about 8 minutes. Stir in the rice. Add about 2 cups of the hot stock, or enough to just cover the rice, and cook, stirring constantly, until the stock has been absorbed. Continue to add the stock, 2 cups at a time, stirring briskly, until the rice is tender and the sauce is creamy, about 30 minutes total. Season with salt and pepper and stir in the parsley. Transfer the rice to the prepared baking dish.