summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2018-10-01 16:34:50 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2018-10-01 16:35:27 -0400
commitb171a2ed0351aff755c34ca9cf51e8e33c2df95e (patch)
tree6e07f331c026fea971f9256f0f8a6534d568a96f /doc
parent29d54ab69b689c2bc4b9be8273f4c0a96e37153f (diff)
downloadsqlalchemy-b171a2ed0351aff755c34ca9cf51e8e33c2df95e.tar.gz
Add .info to InstanceState
Added ``.info`` dictionary to the :class:`.InstanceState` class, the object that comes from calling :func:`.inspect` on a mapped object. Fixes: #4257 Change-Id: I32d043f369edb708a17eec2e0b8876db0c1891b4
Diffstat (limited to 'doc')
-rw-r--r--doc/build/changelog/migration_13.rst19
-rw-r--r--doc/build/changelog/unreleased_13/4257.rst10
2 files changed, 29 insertions, 0 deletions
diff --git a/doc/build/changelog/migration_13.rst b/doc/build/changelog/migration_13.rst
index 500062686..08f62bb02 100644
--- a/doc/build/changelog/migration_13.rst
+++ b/doc/build/changelog/migration_13.rst
@@ -20,6 +20,25 @@ potentially backwards-incompatible changes in behavior.
New Features and Improvements - ORM
===================================
+.. _change_4257:
+
+info dictionary added to InstanceState
+--------------------------------------
+
+Added the ``.info`` dictionary to the :class:`.InstanceState` class, the object
+that comes from calling :func:`.inspect` on a mapped object. This allows custom
+recipes to add additional information about an object that will be carried
+along with that object's full lifecycle in memory::
+
+ from sqlalchemy import inspect
+
+ u1 = User(id=7, name='ed')
+
+ inspect(u1).info['user_info'] = '7|ed'
+
+
+:ticket:`4257`
+
Key Behavioral Changes - ORM
=============================
diff --git a/doc/build/changelog/unreleased_13/4257.rst b/doc/build/changelog/unreleased_13/4257.rst
new file mode 100644
index 000000000..72cac1e1b
--- /dev/null
+++ b/doc/build/changelog/unreleased_13/4257.rst
@@ -0,0 +1,10 @@
+.. change::
+ :tags: feature, orm
+ :tickets: 4257
+
+ Added ``.info`` dictionary to the :class:`.InstanceState` class, the object
+ that comes from calling :func:`.inspect` on a mapped object.
+
+ .. seealso::
+
+ :ref:`change_4257`