Well it returns "1" when I change it to that. Dimitar Petrov <[email protected]> wrote on 05/31/2012 04:00:31 PM:
> From: > > Dimitar Petrov <[email protected]> > > To: > > The elegant MVC web framework <[email protected]> > > Date: > > 05/31/2012 04:02 PM > > Subject: > > Re: [Catalyst] Deep Recusion error > > 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 <[email protected] > > 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 > > [image removed] > > GTS Services Delivery > > > > Phone: > > +1-563-845-4674 > > > > Tie-Line: > > 946-4674 > > > > Mobile: > > +1-563-940-7147 > > > > e-mail: > > [email protected] > > > > "Ideas come from everything" -- Alfred Hitchcock > > > > > > > > _______________________________________________ > List: [email protected] > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/[email protected]/ > Dev site: http://dev.catalyst.perl.org/ > _______________________________________________ > List: [email protected] > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/[email protected]/ > Dev site: http://dev.catalyst.perl.org/
_______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
