![]() |
|
Perl-Sensitive Sunglasses | |
PerlMonks |
Re: DBIx::Class and many-to-many searchingby zby (Vicar) |
on May 30, 2006 at 12:25 UTC ( #552479=note: print w/replies, xml ) | Need Help?? |
Update: Added code to generate the params.
Hmm - that might be pretty hard (I assume that you want an article that is linked to all of the tags in @with instead of the castaway's interpretation). Here are some loose thoughts. Lets take a bit simplified case where the @with contains the articlelinks ids and not think about the @without part at all. Than you need a query like: To produce this with DBIC you need something like: The @without part is a bit simpler, thanks to De Morgan lows. But how to compose those two parts? In raw SQL I would use 'EXCEPT' but in DBIC? And how to go from the list of 'articlelinks' ids to tags? More questions than answers here - but I've heard mst was looking for hard cases so perhaps some day he shall simplify that? I'm interested - as I use a similar structure in my bookmarking app.
In Section
Seekers of Perl Wisdom
|
|