[Dbix-class] query for m:n relation
Charlie Garrison
garrison at zeta.org.au
Sun Oct 3 14:59:40 GMT 2010
Good morning,
On 3/10/10 at 2:42 PM +0200, David Schmidt <davewood at gmx.at> wrote:
>How to express this query for DBIx::Class is beyond my still evolving
>DBIC skills.
Without seeing some of your schema, real examples won't be possible. This might get you started.
$pictures_rs->search(
{
'tags.id' => { -in => \@tag_ids }
},
{
join => { 'picture_tags' => 'tags' }
}
);
Charlie
--
Ꮚ Charlie Garrison ♊ <garrison at zeta.org.au>
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
〠 http://www.ietf.org/rfc/rfc1855.txt
More information about the DBIx-Class
mailing list