[Catalyst] Deep Recusion error

Kenneth S Mclane ksmclane at us.ibm.com
Thu May 31 21:15:47 GMT 2012


Well it returns "1" when I change it to that.

Dimitar Petrov <mitakaa at gmail.com> wrote on 05/31/2012 04:00:31 PM:

> From:
> 
> Dimitar Petrov <mitakaa at gmail.com>
> 
> To:
> 
> The elegant MVC web framework <catalyst at lists.scsys.co.uk>
> 
> 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 <ksmclane at 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 
> 
> [image removed] 
> 
> GTS Services Delivery 
> 
>   
> 
> Phone: 
> 
> +1-563-845-4674 
> 
>   
> 
> Tie-Line: 
> 
> 946-4674 
> 
>   
> 
> Mobile: 
> 
> +1-563-940-7147 
> 
>   
> 
> e-mail: 
> 
> ksmclane at us.ibm.com 
> 
>   
> 
> "Ideas come from everything" -- Alfred Hitchcock 
> 
>   
> 
>  
> 
> 
> 
> _______________________________________________
> List: Catalyst at 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/

> _______________________________________________
> List: Catalyst at 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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120531/be82202a/attachment.htm


More information about the Catalyst mailing list