doctrine 2 with CodeIgniter 2没有元数据类来处理 [英] doctrine 2 with CodeIgniter 2 No Metadata classes to process

查看:152
本文介绍了doctrine 2 with CodeIgniter 2没有元数据类来处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用CodeIgniter 2与doctrine 2,这是我正在工作的项目



https://github.com/wildlyinaccurate/CodeIgniter-2-with-Doctrine-2



我需要从现有的数据库生成实体类



,所以我将Doctrine配置为开发模式,并且在CodeIgniter上设置数据库



之后我写这个命令



php doctrine orm:convert-mapping --from-database annotation models / generated

从数据库正确生成的类,但没有任何方法,之后我为生成实体写了这个命令。



php doctrine orm:generate-entities --regenerate-entities =1models / generated



但是我发现这个错误没有要处理的元数据类



谢谢。

解决方案

ity文件生成,你neet做删除使用Doctrine\ORM\Mapping as ORM;



并将ORM\替换为


I use CodeIgniter 2 with doctrine 2 and this is the project that I am working in

https://github.com/wildlyinaccurate/CodeIgniter-2-with-Doctrine-2

I need to generate Entity classes from existing Database

so I configured the Doctrine to be in development mode and I set the Database on the CodeIgniter

after that I write this command

php doctrine orm:convert-mapping --from-database annotation models/generated

the classes generated correctly from database but without any method,after that I write this command for generating entities

php doctrine orm:generate-entities --regenerate-entities="1" models/generated

but I find this error "No Metadata classes to process"

Thanks.

解决方案

In the entity files generated, you neet do delete "use Doctrine\ORM\Mapping as ORM;"

and replace "ORM\" with ""

这篇关于doctrine 2 with CodeIgniter 2没有元数据类来处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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