Bake every table in CakePHP?

北慕城南 提交于 2019-12-05 01:47:44

问题


The database I'm working on has more than 100 tables, so I'm not going to sit here baking a model and controller for each one individually. I would like to bake all of the tables at the same time with something like the .xml files in Hibernate that tells it the limitations on fields so that I don't have to go through every column on every table, and automatically select the relationships. Is this possible?


回答1:


To bake all of you models, use cake bake model all.

Controllers would be cake bake controller all

For Reference




回答2:


.\console\cake bake model all 

In your app folder if you haven't yet set the path to cake.



来源:https://stackoverflow.com/questions/18899254/bake-every-table-in-cakephp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!