[Catalyst] The Definitive Guide to Catalyst ... p. 165 listing
all users and their roles
learn.catalyst at gmail.com
Wed Jul 11 18:25:13 GMT 2012
I thought that the many_to_many was a relationship bridge and as limited to
what it could do. I was studying the many_to_Many examples in the book to
help my real problem in a test application I am trying to work on. I guess
I should start a new thread for questions related to that. I will do that
and try to continue understanding the relationships.
On Wed, Jul 11, 2012 at 12:48 PM, Tim Anderson <tja824 at gmail.com> wrote:
> <li>[% role.role.role %]</li> works because you're accessing the role
> name (the third 'role') through the 'role' accessor (the second 'role')
> which is defined in your many-to-many relationship:
> __PACKAGE__->many_to_many("roles", "user_roles", *"role"*);
> This is one of the beauties of DBIC; as soon as you have your
> relationships defined, you have paths to the data you need. Imagine tryi=
> to write the same type of request across a multiple key relationship.
> On Wed, Jul 11, 2012 at 11:29 AM, Robyn Jonahs <learn.catalyst at gmail.com>=
>> Thanks, that worked. Now I am off to see why.
>> [ snip ]
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> Dev site: http://dev.catalyst.perl.org/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Catalyst