On Fri, Feb 26, 2010 at 03:13:50PM -0500, Markos Kapes wrote:
> So, I had a class that had an internal _connection. When I tried to pickle
> it, I got errors, which from the looks of main were related to whether I had
> a per instance connection or went through sqlhub. So I rewrote the class &
> code as follows:
I haven't released the instance pickling code, it is still in the trunk.
You are brave to use it!
> connection =
> connectionForURI('mysql://%s:%...@%s:3306/%s?debug=1&use_unicode=1&charset=utf8'
> % (dbuser,dbpass,dbhost,dbname))
> sqlhub.processConnection = connection
>
> class Title(SQLObject):
> class sqlmeta:
> fromDatabase = True
> books = MultipleJoin('Book')
> author = RelatedJoin('Author',
> intermediateTable='author_title',createRelatedTable=True)
> categorys = MultipleJoin('Category')
> kind = ForeignKey('Kind')
> listTheseKeys=('kind')
>
> but I'm still getting the same PicklingError.
I'll look into it.
> What can I be missing? I've seen a few recent posts about fixing this
Fixing what? I cannot unpickle the exact per-instance connection, so I
refuse to pickle it (and the SQLObject instance with it).
Oleg.
--
Oleg Broytman http://phd.pp.ru/ [email protected]
Programmers don't die, they just GOSUB without RETURN.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss