What is difference between Doctrine 1.2 and 2.0, how to choose between them.
Doctrine 2
Doctrine 1.2
Doctrine 2.0
$user = new User;
$user->setName('Mr.Right');
$em->persist($user);
$em->flush();
Doctrine 1.2
$user = new User;
$user->setName('Mr.Right');
$user->save();
To summarize, imho Doctrine 2.0 has a steeper learning curve even if it performs better (clever use of transactions). I find ActiveRecord persistence model and magic methods rather clumsy so I'll go with the 2.0, but this is my personal opinion, Doctrine 1.2 is still very good (expecially with small projects where the 2.0 could be overkill)
see also
Doctrine 2.0 ready for use?
Datamapper vs ActiveRecord
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