[Dbix-class] how to select from two tables ?

Silent silent2600 at gmail.com
Mon Sep 17 12:32:14 GMT 2007


thanks all!

It works now !

thanks!

2007/9/17, eden <edencardim at gmail.com>:
>
> On 9/15/07, Jason Kohles <email at jasonkohles.com> wrote:
> > $row->uid->uname, although you probably want to rename the
> > relationship so it makes more sense, by including
> >
> > My::Schema::News->belongs_to( 'author', 'My::Schema::Author', 'uid' );
> >
> > Then you can get it as;
> >
> > $row->author->uname;
>
> You can also use the proxy attribute:
>
> My::Schema::News->belongs_to( 'author', 'My::Schema::Author', 'uid', {
> proxy =3D> [qw/uname/]} );
>
> $row->uname; # will automatically call $row->author->uname
>
> --
> edenc.vox.com
>
> _______________________________________________
> List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive:
> http://www.grokbase.com/group/dbix-class@lists.rawmode.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20070917/87f=
08b2f/attachment.htm


More information about the DBIx-Class mailing list