[Catalyst] DBIC puking on relationships from objects within TT2 but not from stash objects

apv apv at sedition.com
Sat Jul 7 03:04:40 GMT 2007


So, in my template I have this and it works fine if I assign "user,"  
a DBIC object, to the stash from the controller.

  [% user.votes %]

But if I do this to get the user inside the template:

  [% user = Catalyst.session.user %]
  [% user.votes %]

I get this fatal error:

  Couldn't render template "undef error - Can't call method "source"  
on an
  undefined value at /Library/Perl/5.8.6/DBIx/Class/ 
ResultSourceHandle.pm line 62.

I can get all of user's regular columns fine, like email, username,  
etc. Just not any of its relationships without the fatal.

Seems like it's not a session specific issue (both FastMmap and File  
engines fail the same way).

Any ideas?


-Ashley



More information about the Catalyst mailing list