开发者

Doctrine 2: Convert mapping to YAML with namespace?

I am using Doctrine 2, and a MySQL back end开发者_JAVA技巧. I am running a CLI command to analyze the the schema and produce YML files. I am using the following CLI command.

 php ./doctrine.php orm:convert-mapping --verbose --force --from-database yml tmp_yaml

I then do some processing on the YAML files, and then have Doctrine create entity files from them. However, we need the entities to be in a particular namespace. Right now I just process the resulting entity .php files, but that is a really bad way to do it.

How can I have Doctrine create YAML's with our namespace. If that is not possible, how can I have Doctrine create entities that are in our namespace?

Thanks!!! -Don!


In the docs they say to name the YAML file and the root element with the full name of the entity class, including the namespace (separated by . instead of \)

Be aware that class-names specified in the YAML files should be fully qualified.

That should be it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜