On Fri, Apr 25, 2008 at 01:56:38PM +0200, Moritz Onken wrote: > Hi, > > I want to add a new method to my Book class. This methods needs to > call a relationship of $author. So how do I get the $author object if > I am calling a function in the Book class. I get the row object by > calling $book = $author->books->first (or similar). > > I read the docs but couldn't anything but > > my $schema = $self->result_source->schema; > > Which gives me the schema itself but not the $author object.
$self->author -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Director http://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Want a managed development or deployment platform? http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/ _______________________________________________ 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]