summaryrefslogtreecommitdiff
path: root/doc/build
diff options
context:
space:
mode:
Diffstat (limited to 'doc/build')
-rw-r--r--doc/build/changelog/unreleased_20/8372.rst23
-rw-r--r--doc/build/orm/internals.rst10
2 files changed, 28 insertions, 5 deletions
diff --git a/doc/build/changelog/unreleased_20/8372.rst b/doc/build/changelog/unreleased_20/8372.rst
new file mode 100644
index 000000000..97927198b
--- /dev/null
+++ b/doc/build/changelog/unreleased_20/8372.rst
@@ -0,0 +1,23 @@
+.. change::
+ :tags: bug, orm
+ :tickets: 8372
+
+ Changed the attribute access method used by
+ :func:`_orm.attribute_mapped_collection` and
+ :func:`_orm.column_mapped_collection`, used when populating the dictionary,
+ to assert that the data value on the object to be used as the dictionary
+ key is actually present, and is not instead using "None" due to the
+ attribute never being actually assigned. This is used to prevent a
+ mis-population of None for a key when assigning via a backref where the
+ "key" attribute on the object is not yet assigned.
+
+ As the failure mode here is a transitory condition that is not typically
+ persisted to the database, and is easy to produce via the constructor of
+ the class based on the order in which parameters are assigned, it is very
+ possible that many applications include this behavior already which is
+ silently passed over. To accommodate for applications where this error is
+ now raised, a new parameter
+ :paramref:`_orm.attribute_mapped_collection.ignore_unpopulated_attribute`
+ is also added to both :func:`_orm.attribute_mapped_collection` and
+ :func:`_orm.column_mapped_collection` that instead causes the erroneous
+ backref assignment to be skipped.
diff --git a/doc/build/orm/internals.rst b/doc/build/orm/internals.rst
index 73a6428e7..19c88d810 100644
--- a/doc/build/orm/internals.rst
+++ b/doc/build/orm/internals.rst
@@ -45,9 +45,8 @@ sections, are listed here.
:members: __get__, __set__, __delete__
:undoc-members:
-.. autodata:: MANYTOONE
-
-.. autodata:: MANYTOMANY
+.. autoclass:: LoaderCallableStatus
+ :members:
.. autoclass:: Mapped
@@ -67,8 +66,6 @@ sections, are listed here.
.. autofunction:: merge_frozen_result
-.. autodata:: ONETOMANY
-
.. autoclass:: PropComparator
:members:
:inherited-members:
@@ -77,6 +74,9 @@ sections, are listed here.
:members:
:inherited-members:
+.. autoclass:: RelationshipDirection
+ :members:
+
.. autodata:: RelationshipProperty
.. autoclass:: Synonym