Simple Nested Sets in Doctrine 2
17 Nov 2011 • 4 minute readUnlike Doctrine 1 with it’s NestedSet behaviour, there is no nested set functionality in the core of Doctrine 2. There are a few extensions available that offer nested set support:
- DoctrineExtensions by Gediminas Morkevicius
- Doctrine2 Hierarchical Structural Behavior by Guilherme Blanco
- Doctrine2 NestedSet by Brandon Turner
I tried all of these extensions, but none of them felt simple or lightweight enough for my application. What I wanted to do was have a Category entity which could have a tree of sub-categories, e.g:
(Read more)