开发者

Generate YAML schema or models for Doctrine from MySQL database

Is it somehow possible to automatically generate a YAML schema file or models from an existing MySQL database?

I need to create models for Doctrine but writing the model classes manually seems extremely boring to me. I already have MySQL database with tables and all relations so it would help开发者_JS百科 me if there is some way to generate Doctrine models from it.


If you are using doctrine 2:

http://www.doctrine-project.org/docs/orm/2.0/en/reference/tools.html#reverse-engineering


Yes, it is possible ;-)


For Doctrine 1.2, take a look at the Command Line Interface : amongst other utilities, you have the possibity to generate the YAML files from an existing database.

And, for Doctrine 2.0, you'll want to take a look at Reverse Engineering

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜