如何用yaml在doctrine2中建模遗传? [英] how to model inheritance in doctrine2 with yaml?

查看:171
本文介绍了如何用yaml在doctrine2中建模遗传?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何声明doctrine2继承yaml的方式?



我在这个原则文档中没有找到任何代码片段,示例或食谱文章。 >

当我尝试doctrine1的方式,我收到一个错误,实体没有主键。



谢谢! / p>

解决方案

尝试使用示例,并使用原理命令行工具将其转换为yaml参数 orm:转换映射(可以在支持的格式之间转换映射信息)。更多信息 here


How to declare doctrine2 inheritance the yaml way?

I don't find any code snippets, examples or cookbook articles about this in the doctrine documentation.

When i try it the doctrine1 way, i get an error that the Entity has no primary key.

Thanks!

解决方案

Try doing a simple model inheritance using the examples in the documentation (which are in @Annotations format), and converting them to yaml using the doctrine command line tool with parameters orm:convert-mapping (which converts mapping information between supported formats). More information here.

这篇关于如何用yaml在doctrine2中建模遗传?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆