简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM