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

Matt S Trout dbix-class at trout.me.uk
Sat Jul 7 15:11:57 GMT 2007


On Fri, Jul 06, 2007 at 09:30:38PM -0700, apv wrote:
> False alarm. I figured it out. Have to prefetch relationships when  
> putting the user into the session at login or the goodies just ain't  
> in the session info.

The user object is re-retrieved by the auth plugin anyway, so

$c->user->obj->votes

will work.

if you're storing a 'user' object in the session, something like

$c->session->{user}->result_source($c->model('DB')->schema->source('User'));

will restore the result source.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/             http://www.shadowcatsystems.co.uk/ 



More information about the Catalyst mailing list