On Wed, Apr 28, 2010 at 7:27 AM, Matt S Trout <[email protected]> wrote:

> > For that to happen the $session_attendee needs to be specific to a given
> > session (Session id is stored with the $session_attendee instance).
>
> You just answered your own question.
>
> You want a result from the many-many link table and to traverse from there,
> since that table has (session_id, attendee_id).
>

That seems to reason, yes.  Sadly, I'm not seeing the implementation so I
ask for a bit more help.

Again, what I'm after is:

$session_one = $schema->resultset( 'Session' )->find( 1 );

$session_one_attendees = $session_one->attendees;
$first_user_session_one_notes = $session_one_attendees->first->notes;

Which makes me think I should be able to do the reverse with
$session_one_attendees->first->session and get the original Session object
back.  That is, the $session_one_attendees->all are a subclass of Attendee
with an extra "Session" attribute.  These attendees 'know" how they were
created.

Thanks,


-- 
Bill Moseley
[email protected]
_______________________________________________
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]

Reply via email to