[Catalyst] DBIC puking on relationships from objects within TT2
but not from stash objects
apv
apv at sedition.com
Sat Jul 7 16:19:28 GMT 2007
Thanks Matt. That is much better. Stuffing the session with a ton of
data up front didn't strike me as a good idea.
On Jul 7, 2007, at 7:11 AM, Matt S Trout wrote:
> 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