Sorry the code in that previous post was a bit mixed up... I have
revised it.
> in picture:
> __PACKAGE__->has_one(picture_owner => 'Schema::UserPicture', {
> 'foreign.user_picture_id' => 'self.fk_user_picture_id' }, { proxy => [
> qw/owner/], } );
>
> in user_picture:
> __PACKAGE__->has_one(owner => 'Schema::User', { 'foreign.user_id' =>
> 'self.fk_user_id' } );
>
> and in my search:
> my $rs = $self->search(
> undef,
> {
> join => [qw/ user_picture/ ],
> prefetch => [qw/ user_picture/ ]
> }
> );
>
> -Steve
>> I'd implement that with the has_many + prefetch + proxy approach I suggested
>> in my original reply in this thread - which was based on the mistaken
>> assumption that what the OP was doing was what you just described :)
>>
--
Steve Francia
Lead Developer
Takkle, Inc.
212.792.5859 (fax)
[EMAIL PROTECTED]
_______________________________________________
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]/