I have only started discovering Doctrine and noticed the official documentation points to 1.2 as this seems to be the current stable version.
I also noticed that a lot of people seem to mention Doctrine 2 is a "world of difference" compared to Doctrine 1, but when looking at the What's new page, I don't really see an extensive changelog. I am guessing this list only shows the newest additions compared to the previous 2.x build. I expected to find a nice roundup of differences after Googling this same question, but I can not seem it.
I am currently plowing through the Doctrine 1 manual, and will do the same for Doctrine 2 as soon as I finish reading it, but a proper overview of the big changes would be really appreciated, so my question is:
What are the differences between Doctrine1 and Doctrine2?
Doctrine has a command-line interface that allows you to access the SchemaTool, a component that can generate a relational database schema based entirely on the defined entity classes and their metadata. For this tool to work, you need to create an executable console script as described in the tools chapter.
The Doctrine Project is the home to several PHP libraries primarily focused on database storage and object mapping. The core projects are the Object Relational Mapper (ORM) and the Database Abstraction Layer (DBAL) it is built upon.
Doctrine uses the Identity Map pattern to track objects. Whenever you fetch an object from the database, Doctrine will keep a reference to this object inside its UnitOfWork. The array holding all the entity references is two-levels deep and has the keys root entity name and id.
Symfony provides all the tools you need to use databases in your applications thanks to Doctrine, the best set of PHP libraries to work with databases. These tools support relational databases like MySQL and PostgreSQL and also NoSQL databases like MongoDB.
Take a look at this presentation (and maybe some of the related others), really nice!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With