[Dbix-class] Better way? Transparent child/parent relationships

Mike Friedman friedo at friedo.com
Thu May 24 08:02:58 GMT 2007


Thanks, Brandon. Somehow I missed that when I was perusing CPAN
earlier. I am going to try out AdjacencyList.pm and see if it meets my
needs. (I suspect it will.)

I'm glad I posted before I became too attached to my two-table structure. :)


Mike

On 5/24/07, Brandon Black <blblack at gmail.com> wrote:

> In any case, if you really don't need multiple parents, you could
> switch back to just having a "parent_id"  (or parent_category) field
> in "categories" (you'll need to define the FK separately with an ALTER
> TABLE statement probably), and use DBIx::Class::Tree::AdjacencyList
> from CPAN to make it work magically in DBIC.
>
> http://search.cpan.org/~bluefeet/DBIx-Class-Tree-0.01000/lib/DBIx/Class/Tree/AdjacencyList.pm



More information about the Dbix-class mailing list