3 ms·
I've used Doctrine 2 with PHP, and am yet to find another ORM like it in any language. It stands out as unique (to me) in that you just write plain old classes
by wldlyinaccurate 12y ago
I've used Doctrine 2 with PHP, and am yet to find another ORM like it in any language. It stands out as unique (to me) in that you just write plain old classes which don't need to know about the ORM. You write a separate schema which Doctrine reads and then uses proxy objects for the mapping.
Am I the only person that finds this preferable to coupling your objects with the ORM?
- rch 12y agoIt's been a while, but I enjoyed using Castor before other approaches became so widely adopted in the Java world. Does it seem conceptually similar at least? http://castor.codehaus.org http://castor.codehaus.org
- wldlyinaccurate 12y agoFrom the very little I read of the documentation, it seems like a similar concept -- mapping the objects to the data is done outside of the objects.
- fleetfox 12y agoActually Doctrine is Hibernate implemented in php http://hibernate.org/orm/ http://hibernate.org/orm/
- wldlyinaccurate 12y agoInteresting, thanks. I had heard of Hibernate before but never actually looked into it. I can definitely see the similarities - especially between Doctrine's DQL and Hibernate's HQL.
- eevee 12y agoSQLAlchemy also does this. Which is appropriate, since "ORM" implies that on some level you're mapping existing relations to existing objects.