[Grok-dev] Pickling an object stored in the Zodb. How do I skip the __parent__ attribute?
Jegenye 2001 Bt (Miklós Prisznyák)
jegenye2001 at gmail.com
Thu Aug 14 09:11:19 EDT 2008
2008/8/14 Sebastian Ware <sebastian at urbantalk.se>
> I am trying to export and import objects from the Zodb using
> My problem is that the pickler traverses the __parent__ attribute thus
> returning a much larger object graph than I wish to serialize.
> Do I have to subclass the pickler or is there som other smart way of
> making it skip the __parent__ attribute?
You could write an adapter (or modify the class of the content objects
itself) to use __setstate__ and __getstate__ , etc:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Grok-dev