开发者

How to convert the ORM from Propel to Doctrine in Symfony?

开发者 https://www.devze.com 2023-02-27 01:30 出处:网络
I have project made in Symfony using Propel 1.2 and I want to migrate it to use Doctrine 1.4. How can I do this in order to have as few bugs as possible. Is there a clean way to开发者_开发技巧 do th

I have project made in Symfony using Propel 1.2 and I want to migrate it to use Doctrine 1.4.

How can I do this in order to have as few bugs as possible. Is there a clean way to开发者_开发技巧 do this ? And what it presumes ?


There is not clean and automatic way to migrate from Propel to Doctrine, since both project use their own syntax and have their unique features. Changing ORM of an existing project can be long and difficult, depending on it's complexity.

If the project's codebase is clean, however, you should only have to rewrite the model part, all other aspects of the project should'nt change.

An alternative could be to keep propel, but upgrade the version. Your existing code would be compatible, but you could start to use a new, cleaner and more simple api.

0

精彩评论

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

关注公众号