When you conquer the city, remember to sell off anything you capture.
One more thing, I don't know if this is considered an exploit, but when my farms riot, I actually use it as an opportunity to boost production. If they are unhappy enough, I can add several specialists and still keep more unhappy workers then happy workers. A city doesn't starve when it is rioting. Therefore, I can make my hypothetical farm of 12 operate on only something like 10 food.