Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ORM in Django vs. PHP Doctrine

I am a PHP guy. In PHP I mainly use Doctrine ORM to deal with database issues. I am considering move to Python + Django recently. I know Python but don't have experience with Django. Can anyone who has good knowledge of both Doctrine and ORM in Django give me a comparison of features of these two ORM implementations?

like image 515
Ethan Avatar asked Feb 13 '26 19:02

Ethan


2 Answers

I am a rare person who had to switch from Django 1.4 to Symfony 2.1 so I had to use Doctrine 2 instead of current Django ORM.

Maybe Doctrine can do many things but let me tell you that it is a nightmare for me to use it coming from Django.

I'm bored with the verbosity of php/Symfony/Doctrine ...

Also I never needed something that Django's ORM didn't manage already (maybe projects not big enough to reach the limits).

Simply compare the description of data between both orms (including setters & getters)...

like image 191
Pierre de LESPINAY Avatar answered Feb 15 '26 08:02

Pierre de LESPINAY


The Django ORM does everything I want it to do. I've found it to be easier to use and more straight-forward than Doctrine. Sorry that I can't help with an in-depth comparison.

If you find the Django ORM is missing a feature you'd like to have, check out SQL Alchemy. It can easily be used with Django.

like image 24
JAL Avatar answered Feb 15 '26 07:02

JAL