Hello Kenneth,

actually many_to_many helpers are not considered as relationships. It's
just a helper.
What are you trying to achieve? Get all roles for given user? Does
$c->model('authdb::User')->find({username => $username})->roles do the
trick?

Cheers,
Dimitar

On Thu, May 31, 2012 at 10:38 PM, Kenneth S Mclane <ksmcl...@us.ibm.com>wrote:

> Ok, I found that the recursion error is happening when trying to store the
> role in the session.
>
> my $roles = $c->model('authdb::User')->find( { 'username' => $username }, {
>                                 prefetch => 'roles',
>                                 columns => 'roles.role',
>                         });
>                         #$c->session(role => $roles);
>
> When I comment it out the error goes away. I switched back to the above
> code. I am getting "No such relationship roles on User" error but I have
> this in my User.pm:
>
> __PACKAGE__->many_to_many("roles", "user_roles", "role");
>
> I do not understand why it refuses to acknowledge it.
>
> Regards
>   ------------------------------
>   *Kenneth McLane*  700 Locust St
>  Systems Compliance Services  Dubuque, 52001-6838 I1OB  USA GTS Services
> Delivery    Phone: +1-563-845-4674    Tie-Line: 946-4674    Mobile:
> +1-563-940-7147    e-mail: ksmcl...@us.ibm.com
> ------------------------------
> "Ideas come from everything" -- Alfred Hitchcock
>
> _______________________________________________
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
>

<<image/gif>>

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to