Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the differences between Doctrine1 and Doctrine2?

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?

like image 545
Aron Rotteveel Avatar asked Dec 09 '10 16:12

Aron Rotteveel


People also ask

What is Doctrine entity?

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.

What is Doctrine db?

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.

How Doctrine works?

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.

What is Doctrine in Symfony?

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.


1 Answers

Take a look at this presentation (and maybe some of the related others), really nice!

like image 183
initall Avatar answered Oct 12 '22 14:10

initall