我正在使用Doctrine2管理我的数据库。当我列出所有Doctrine2命令时,我想知道为什么有两种类型的命令是相同的解释:
generate:doctrine:crud Generates a CRUD based on a Doctrine entity
generate:doctrine:entities Generates entity classes and method stubs from yourmapping information
generate:doctrine:entity Generates a new Doctrine entity inside a bundle
generate:doctrine:form Generates a form type class based on a Doctrine entity和
doctrine:generate:crud Generates a CRUD based on a Doctrine entity
doctrine:generate:entities Generates entity classes and method stubs from your mapping information
doctrine:generate:entity Generates a new Doctrine entity inside a bundle
doctrine:generate:form Generates a form type class based on a Doctrine entity这两组之间有什么不同吗?
发布于 2013-09-28 14:34:40
这些命令也会做同样的事情:
生成:原则:xxx命令
是以下名称的别名:
原则:生成:xxx命令
它们实现了相同的目标,可以互换使用。
如果您查看这两个命令的源代码,您将发现更多信息:
看起来上面的两个包是相互完成的。也就是说,在DoctrineBundle中没有原则:generate:entity命令,也没有任何理论:generate:generate中的实体,但是它们一起给出了相关命令的完整列表。车轮不能再发明了。
https://stackoverflow.com/questions/19067682
复制相似问题