diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-01-02 19:54:31 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-01-02 19:54:31 -0500 |
commit | 4f18ce0af5d634120e85fe64d56f4f9310e13457 (patch) | |
tree | 5e85df90b39934efe316a3508f4a957c2965aabf /lib/sqlalchemy/orm/state.py | |
parent | 350aed3fdb9f1e73e69655e53f44ca6a91c196da (diff) | |
download | sqlalchemy-4f18ce0af5d634120e85fe64d56f4f9310e13457.tar.gz |
- add support for pickling with mutable scalars, mutable composites
- add pickle/unpickle events to ORM events. these are needed
for the mutable extension.
- finish mutable extension documentation, consolidate examples,
add full descriptions
Diffstat (limited to 'lib/sqlalchemy/orm/state.py')
-rw-r--r-- | lib/sqlalchemy/orm/state.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/state.py b/lib/sqlalchemy/orm/state.py index da91a353e..7a93b5cb0 100644 --- a/lib/sqlalchemy/orm/state.py +++ b/lib/sqlalchemy/orm/state.py @@ -147,6 +147,9 @@ class InstanceState(object): ) if self.load_path: d['load_path'] = interfaces.serialize_path(self.load_path) + + self.manager.dispatch.pickle(self, d) + return d def __setstate__(self, state): @@ -182,7 +185,7 @@ class InstanceState(object): if 'load_path' in state: self.load_path = interfaces.deserialize_path(state['load_path']) - # TODO: need an event here, link to composite, mutable + manager.dispatch.unpickle(self, state) def initialize(self, key): """Set this attribute to an empty value or collection, |