On Sat, Nov 11, 2006 at 01:17:17AM +0000, Josef Karthauser wrote:
> Okie; so are 'self' and 'foreign' magic labels?
>
> How does that translate into prefetch calls? (code extract from
> catalyst follows),
>
> my $rs = $c->model('Contact')->
> search($criteria,
> { page => $page, rows => 10,
> order_by => [$order_by, $default_order,
> "domains.domainname"],
> #1 prefetch => { 'domains' }
> #2 prefetch => { 'domains' =>
> #2 { 'self.contactid' => 'foreign.registrant',
> #2 'self.owner' => 'foreign.owner' }}
> });
>
> Neither of #1 or #2 appear to do what I want. I get 'No such
> relationship' whenever I try and process the request.
>
> Am I missing a whole chunk of manual somewhere? I've scoured most of
> it I think.
> What do you reckon? Does anyone have any hints for me for prefetching based upon multicolumn keys? I would have thought that #1 would work, seeing as the correct relationships are already described in the class files. Joe -- Josef Karthauser ([EMAIL PROTECTED]) http://www.josef-k.net/ Physics Particle Theory (student) http://www.pact.cpes.sussex.ac.uk/ ================ An eclectic mix of fact and theory. =================
pgpoMUJeR92wp.pgp
Description: PGP signature
_______________________________________________ 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]/
