News Feed
Sections




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

Jani Hartikainen's Blog:
Understanding Doctrine's NestedSet feature
September 02, 2008 @ 10:29:56

On his CodeUtopia blog Jani Hartikainen gives an inside look at a feature of Doctrine, nested sets.

The Doctrine library comes with a feature called nested set, which makes saving trees in a database easy. However, it's quite easy to accidentally cause a lot of extra unneeded queries if not being careful. Here are some pointers to keep in mind while working with the nested set, and some example queries to make understanding it easier.

He gives an example, showing how to get rows from the database - parent and child - and some optimization tips to keep things light. There's also some pros and cons included for doing it either way (the standard fetching or using the more optimized versions).

2 comments voice your opinion now!
doctrine nestedset feature fetch database row parent child


blog comments powered by Disqus

Similar Posts

Blue Parabola Blog: Magento Feature Analysis Series, Part 14: Site Management Offering

Kristian Kohntopp's Blog: Annotations to "Five Common PHP database problems"

IBM developerWorks: MVC with Agavi - Add forms and database support with Agavi and Doctrine

Zachary Burnham's Blog: Code: Setting up unit testing in Zend Framework with multiple databases

Matthew Weier O'Phinney's Blog: A Primer for PHP 5.3's New Language Features


Community Events





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


framework code series api bugfix threedevsandamaybe introduction conference deployment list laravel zendserver language tips podcast community symfony voicesoftheelephpant release interview

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