I use pickle to serialise unsaved objects in a user session. Normally this works fine, except that for development I use an auto-reloading server, and pickling some objects is hitting a case where some lazy attribute isn't fully compiled.
... File '/home/avdd/work/careflight/src/intranet.ops2/carenet/lib/ python2.5/site-packages/sqlalchemy/orm/collections.py', line 607 in __getstate__ return {'key': self.attr.key, AttributeError: 'NoneType' object has no attribute 'key' This is when using an ordering_list. I would have assumed that calling orm.compile_mappers() is enough to prevent this problem, but that is not so. Is there some hook that I can call when my application is fully initialised to ensure that all attributes are fully instrumented and avoid this pickling problem? Or can I just do a sweep of all my mapper attributes at startup? While the problem is nothing more than an inconvenience for me, I intend to make heavy use of pickled objects for draft object storage and don't want my users losing data across system restarts. a. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.