4 ms·
Some of us have been working with php for 22 years at this point and frankly I think Doctrine is the best ORM period.
by hparadiz 5mo ago
Some of us have been working with php for 22 years at this point and frankly I think Doctrine is the best ORM period.
- nullable_bool 5mo agoWhat makes it so good? Genuinely curious
- hparadiz 5mo agoIt uses a DTO style mapping system and central factory EntityManager making unit testing a breeze. Model definitions let you map database primitives directly from the models. It will automagically build you the table on first use and it's capable of moving data from one engine to another engine on the fly. Migrations are built in and it's capable of generating migrations directly from changes to a model. It's smart about SQL multi saves (transactions), joins for relationships, views, and a bunch of other database features that most ORMs don't even bother to be even aware of let alone implement. It's basically an enterprise level ORM. Functionally it works like ActiveRecord but under the hood it's very different.
- winrid 5mo agoHave you used Django's ORM?
- hparadiz 5mo agoThe first time I heard the name Django was like 15 years ago in college so I'm sure I've used it by hosting some project for one reason or another over the years. Python is just not my go to. Also I maintain my own framework in PHP entirely so that's what I pull off the shelf when I wanna do CRUD.
- winrid 4mo agoSure thing, was just curious since you mentioned rails. Django's ORM is pretty similar (auto generated migrations, super easy relations, etc).