]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- also caveats for update() / delete() regarding single
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 12 Sep 2016 22:36:01 +0000 (18:36 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 12 Sep 2016 22:36:01 +0000 (18:36 -0400)
table inheritance

Change-Id: If1511812a22a53537409f902f73e2e52ae3e4a3d

lib/sqlalchemy/orm/query.py

index bbb6cd5193dde401eea1457fcf300eaab434411f..2b2b110955f907d2cd073d44c43cb004a58e8d92 100644 (file)
@@ -3050,6 +3050,11 @@ class Query(object):
               mappings unless you have taken the additional steps to make
               this feasible**.
 
+            * The polymorphic identity WHERE criteria is **not** included
+              for single- or
+              joined- table updates - this must be added **manually** even
+              for single table inheritance.
+
             * The method does **not** offer in-Python cascading of
               relationships - it is assumed that ON DELETE CASCADE/SET
               NULL/etc. is configured for any foreign key references
@@ -3207,6 +3212,11 @@ class Query(object):
                         filter(Employee.name == 'dilbert').\\
                         update({"engineer_type": "programmer"})
 
+            * The polymorphic identity WHERE criteria is **not** included
+              for single- or
+              joined- table updates - this must be added **manually**, even
+              for single table inheritance.
+
             * The :meth:`.MapperEvents.before_update` and
               :meth:`.MapperEvents.after_update`
               events **are not invoked from this method**.  Instead, the