Minecraft wiki entry for Crop_farming, associated text: Since seeds aren't food, a villager with an inventory full of seeds continues to harvest and replant crops, but cannot pick up the resulting wheat or beetroots. Hoppers or hopper minecarts below the farmland can collect the crops, while allowing the villager to replant the crop.
For carrots and potatoes, a villager replants the field, but stops harvesting once he has enough food in his inventory. A redstone mechanism timed to the growth rate of the crops is used to periodically pour water over the farmland to wash the crops into a collection system.
For carrots, potatoes, beetroots or bread, a second villager with empty inventory may be placed nearby such that the farmer attempts to share food, but the throws cannot reach the second villager. Or the second villager may have an inventory full of seeds (or wheat for non-farmers) so he cannot pick up any food. Hoppers placed where the thrown food lands can collect the thrown food.