News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

GotoTech.com:
Developer Diary Taming Doctrine's 2000 Flushes
May 02, 2012 @ 10:19:35

In this new post to the GotoTech.com blog Eric Burns talks about a way he's "tamed Doctrine's 2000 flushes" with a wrapper around the EntityManager to make controlling the database flushes simpler.

For my project I decided to use the Doctrine 2 ORM to manage my data layer. We also use this at work, so the biggest reason I chose this was to be able to learn more about Doctrine to help me in my job. But this decision also makes sense for my project because my entity relationships will likely be fairly straightforward for the most part and using an ORM will allow me to make a lot of progress very quickly without (I hope) causing me lots of trouble later on.

His handy wrapper (Data Manager) makes it simpler to perform the flush and still take transactions into consideration. His simple class includes "flush", "commit" and "startTransaction" methods that don't actually perform the flush until the commit is called.

0 comments voice your opinion now!
doctrine flush database wrapper transaction


blog comments powered by Disqus

Similar Posts

PHPMaster.com: More Bulletproofing with PHPUnit’s Database Extension

ParanoidFerret.com: Using Flex, PHP, and JSON to Modify a MySQL Database

DevShed: Abstracting Database Access Using Polymorphism with Objects in PHP 5

Dave Dash's Blog: Installing a PHP that can do symfony+doctrine on Dreamhost

Daniel Krook's Blog: Native XML Databases at NYPHP next week


Community Events





Don't see your event here?
Let us know!


version conference composer opinion voicesoftheelephpant framework podcast unittest tool release interview symfony list community api series configure language introduction laravel

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework