]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Fixed a bug in the examples/generic_assocaitions/discriminator_on_association.py
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 24 Nov 2014 17:33:56 +0000 (12:33 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 24 Nov 2014 17:34:18 +0000 (12:34 -0500)
example, where the subclasses of AddressAssociation were not being
mapped as "single table inheritance", leading to problems when trying
to use the mappings further.

(cherry picked from commit 2098001ad3e0a40aa909a347ec91c12fab04a657)

doc/build/changelog/changelog_09.rst
examples/generic_associations/discriminator_on_association.py

index abf564875da36bd6bfa7c6a7d7af6cab4f7eea07..ef0277935fd1f62b2aa910026644e3ef1f518fd8 100644 (file)
 .. changelog::
     :version: 0.9.9
 
+    .. change::
+        :tags: bug, examples
+        :versions: 1.0.0
+
+        Fixed a bug in the examples/generic_assocaitions/discriminator_on_association.py
+        example, where the subclasses of AddressAssociation were not being
+        mapped as "single table inheritance", leading to problems when trying
+        to use the mappings further.
+
     .. change::
         :tags: bug, orm
         :versions: 1.0.0
index e03cfec0093441d0605e1e8c5b9a39deba0ed0b9..7bb04cf85196bae345aba1e8f284e98ccc4a6120 100644 (file)
@@ -84,6 +84,7 @@ class HasAddresses(object):
                         "%sAddressAssociation" % name,
                         (AddressAssociation, ),
                         dict(
+                            __tablename__=None,
                             __mapper_args__={
                                 "polymorphic_identity": discriminator
                             }