[Catalyst] Usage of Catalyst::Plugin::Singleton
Alex Kavanagh
alex at tinwood.homelinux.org
Mon Jan 23 22:49:25 CET 2006
At Mon, 23 Jan 2006 16:39:33 -0500,
John Lifsey - Contractor - wrote:
>
>
> > Now you want any Category to be related to any other category. Call
> > that, say CategoryAssocs and give it two columes 'id1' and 'id2'.
> >
> > Now to relate any two categories you simply put the id of each
> > category into id1 and id2.
> >
> >
> I was about to do something similar, wouldn't it be better to have
> another column in category for parent_id?
Well, I started off with that, but it isn't really a parent-child
relationship. It's a many-to-many but back to the same table, where
any single Category can be related to many other ones (apart from
itself). It seems like some kind of self-join but I can't quite get
my head around it - hence the meta-functions to pull off the
functionality.
Alex.
More information about the Catalyst
mailing list