>I *think* I need to search on photos table, and join galleries
>and tags; but I can't seem to get the syntax right
OK, I answered part of my question. I got this query to
work, so I'm pretty sure my classes and relations are
good:
my $photo_obj = [$c->model('CatapultDB::Photos')->search(
{
'tags.tag' => "$tag",
},
{
join => [qw/ gallery tags /],
}
)->all];
The problem arises when I try to add paging. This
doesn't work:
$page = $page || 1;
my $photo_obj = [$c->model('CatapultDB::Photos')->search(
{
'tags.tag' => "$tag",
},
{
join => [qw/ gallery tags /],
}
)->page($page)];
Removing the anonymous array doesn't work either.
Does anyone have any ideas?
/dennis
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/