On 4/25/07, Tobias Kremer <[EMAIL PROTECTED]> wrote:
Am 25.04.2007 um 22:42 schrieb Brandon Black: > On 4/25/07, Tobias Kremer <[EMAIL PROTECTED]> wrote: >> Hi folks, >> >> I have a table which has two columns referencing the same class, >> something >> like this: > > You don't give a lot of details on what the failing behavior actually > is, but I'm guessing that at least one problem you're having is that > you're proxying the same column names into the local class twice from > two different relationships. This might be a good place to not use > proxy, considering the conflict. 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. Or you could make some custom accessors called requestor_username, etc to do this for you. -- Brandon _______________________________________________ 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/