Push table generation into a model.