Doctrine 从 YAML (symfony) 生成模型的问题
我已经编写了 schema.yml,但是当我尝试生成模型时遇到两个问题:
我已使用
generateTableClasses: false
禁用了表类生成,但生成了 classTable.class.php。< /p>我已经指定了包来在子文件夹中生成类,我想知道如何不生成
/model/doctrine/packages/PluginMyClass.class.php
?我尝试过选项:packagesPath: /
packagesFolderName: /
但我的包是在 /model/doctrine/MyPackage/MyClass.class.php
中生成的
AND 在 /model/doctrine/packages/PluginClass.class.php
我给你我的 schema.yml 的一部分:
generateTableClasses: false
packagesPath: /
packagesFolderName: /
Personnage:
tableName: personnage
package: Personnage
columns:
# Here my columns
Guerrier:
package: Personnage
inheritance:
extends: Personnage
type: simple
I have written my schema.yml but I have two problems when I try to generate model :
I have disabled table class generate with
generateTableClasses: false
but the classTable.class.php are generated.I have specified packages to generate classes in subfolders, and I want to know how don't generate
/model/doctrine/packages/PluginMyClass.class.php
? I have tried options :packagesPath: /
packagesFolderName: /
But my package is generated in /model/doctrine/MyPackage/MyClass.class.php
AND in /model/doctrine/packages/PluginClass.class.php
I give you a part of my schema.yml :
generateTableClasses: false
packagesPath: /
packagesFolderName: /
Personnage:
tableName: personnage
package: Personnage
columns:
# Here my columns
Guerrier:
package: Personnage
inheritance:
extends: Personnage
type: simple
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不应该出现在架构中。像这样修补你的
ProjectConfiguration.class.php
:尝试此处描述的解决方案 - http://melikedev.com/2009/10/26/symfony-w-doctrine-package-over-ride-in-schema-yml/
希望有帮助。
That shouldn't be in schema. Patch your
ProjectConfiguration.class.php
like so:Try a solution described here - http://melikedev.com/2009/10/26/symfony-w-doctrine-package-over-ride-in-schema-yml/
Hope that helps.