Guillermo Roditi wrote:
You are trying to store a resultset into the session. I made this same
mistake when I started using catalyst, don't worry. What's happening
is that your object is being serialized in between page views and you
are losing the DB connection there.

Ok, I understand. Thanks for the explanation!

DBIC allows you to freeze and thaw
objects and restore connections pretty easily, see the POD in
DBIx::Class::Schema for more info. I know that the object you got
using find() appears to work, but relationships will be broken. Either
properly freeze and thaw objects, or fetch them in every request.

Had a quick first look at that, but I'll need a longer second one in order to really understand how this works... ;-)


Following Stephen's suggestion, I now have exactly the behavior I wanted. Good. But is this good practice or would be the freeze/thaw method 'cleaner' and more 'Catalyst-conform'?

--Pierre

PS: thanks again for the super-quick reaction time, guys! Amazing...

_______________________________________________
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/

Reply via email to