Rolf Schaufelberger wrote:
Hi,
suppose I have a table users and a table address with a many-to many
relation between users and addresses.
Now when I fetch a user object and I call an address method like
$user->address({ search args})->first->do_something()
Is there a way in do_someting to access the calling user object ?
This boils down to "if I have an $address how do I get the user it belongs_to".
Which in turn requires you simply declare a belongs_to relationship on
Address pointing to User. Or am I missing something here?
_______________________________________________
List: http://lists.scsys.co.uk/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/[email protected]