Jerome Kerdreux wrote:
> I'm wondering how you use session in webware.
> My main problem is that i what to edit some
> SQLObject in session. But i can to that directly
> so i decided to write something that 'clone'
> a SQLObject into a database-less object and put
> it session. This works fine except that objects
> aren't picckable so i can't filesystem a session
You shouldn't keep the SQLObject instances in the session -- they
persist independently in the database, and it can potentially confuse
things if you keep them elsewhere. Well... maybe not so much. Really
they should be pickleable (only they aren't).
I think you could add a method to your classes:
then SQLObject instances would be pickleable. But I haven't tried it.
This is assuming you aren't using transactions, which would complicate
things considerably, and using transactions with sessions like this
would generally require more thought all around.