diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-11-18 13:40:20 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-11-18 13:40:20 -0500 |
commit | bbb2669be0db897a81c3aa29bd4daf8d1621dc9f (patch) | |
tree | 5631d272dc375c528c44312ff05a9476bef177d8 /lib/sqlalchemy/dialects/postgresql/hstore.py | |
parent | d1adef463a836dae83cb0981f06c9b9ad08df780 (diff) | |
download | sqlalchemy-bbb2669be0db897a81c3aa29bd4daf8d1621dc9f.tar.gz |
oops, this needs to be MutableDict
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/hstore.py')
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/hstore.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/hstore.py b/lib/sqlalchemy/dialects/postgresql/hstore.py index d7a161274..c20b23038 100644 --- a/lib/sqlalchemy/dialects/postgresql/hstore.py +++ b/lib/sqlalchemy/dialects/postgresql/hstore.py @@ -142,17 +142,18 @@ class HSTORE(sqltypes.Concatenable, sqltypes.TypeEngine): For a full list of special methods see :class:`.HSTORE.comparator_factory`. For usage with the SQLAlchemy ORM, it may be desirable to combine - the usage of :class:`.HSTORE` with the :mod:`sqlalchemy.ext.mutable` + the usage of :class:`.HSTORE` with :class:`.MutableDict` dictionary + now part of the :mod:`sqlalchemy.ext.mutable` extension. This extension will allow in-place changes to dictionary values to be detected by the unit of work:: - from sqlalchemy.ext.mutable import Mutable + from sqlalchemy.ext.mutable import MutableDict class MyClass(Base): __tablename__ = 'data_table' id = Column(Integer, primary_key=True) - data = Column(Mutable.as_mutable(HSTORE)) + data = Column(MutableDict.as_mutable(HSTORE)) my_object = session.query(MyClass).one() |