in reply to DBIx and ManyToMany Relationships
My DBIx::Class knowledge is a bit rusty, but I think what you want is
$rs->search( {}, { rows => 10, join => { contentlinks => 'content' }, prefetch => { contentlinks => 'content' }, } );
(It might be that the prefetch alone is enough, and you don't need the join; I'm not quite sure).
For constructing queries, ignore your ManyToMany -- it is not a reliationship you can use in queries (only a shortcut on the result objects), so it probably confuses you. Simply ignore it.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: DBIx and ManyToMany Relationships
by tospo (Hermit) on May 30, 2012 at 12:18 UTC |
In Section
Seekers of Perl Wisdom