[Catalyst] Usage of Catalyst::Plugin::Singleton
A. Pagaltzis
pagaltzis at gmx.de
Mon Jan 23 23:54:36 CET 2006
Hi Alex,
* Alex Kavanagh <alex at tinwood.homelinux.org> [2006-01-23 22:35]:
>For a simple case, imagine that you have a table of Categories
>(columns 'id' and 'name').
>
>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 couldn't work out how to get DBIx to do this for me and ensure
>that there were unique entries for relations. i.e. for two ids
>(a) and (b) you don't get entries of (a,b) AND (b,a) in the
>table.
sounds like a database schema constraint to me, not something
that you’d model in DBIC. Whether you can actually express this
constaint in SQL will depend on the RDBMS you’re using, I think.
Regards,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>
More information about the Catalyst
mailing list