[Dbix-class] Multiple belongs_to relationships referencing same class

Oleg Pronin syber.rus at gmail.com
Thu Apr 26 19:04:25 GMT 2007


Try many_to_many relationships

2007/4/26, Tobias Kremer <list at funkreich.de>:
>
> Am 25.04.2007 um 23:10 schrieb Brandon Black:
> > On 4/25/07, Tobias Kremer <list at funkreich.de> wrote:
> >> Sounds like my kind of problem - what are the alternatives to proxy?
> >
> > One alternative to proxy is just to not use proxy.  Proxy is merely
> > convenience.  Instead of saying $user_relation_object->username (which
> > is ambiguous given your duplicate proxy statements), say
> > $user_relation_object->requestor->username or
> > $user_relation_object->receiver->username.
>
> Yeah, but that's exactly what I want to avoid. If somebody does
> $user->confirmed_friendships, he/she is not supposed to know who
> initiated the friendship (requestor or receiver). All he/she wants
> is a list of User objects (except $user) which are friends of $user.
> The same goes for the other two methods. Currently I can't see a
> sane way to accomplish this with DBIx::Class :(
>
> --Tobias
>
>
> _______________________________________________
> 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/dbix-class@lists.rawmode.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20070426/464=
4de62/attachment.htm


More information about the Dbix-class mailing list