summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/expression.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-04-01 17:13:09 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-04-01 17:13:09 +0000
commitad231da3b83bcdad4446690fa37fbe03408a40d6 (patch)
treeaf2efdd02ba000e2b994b7e191f964bed336a841 /lib/sqlalchemy/sql/expression.py
parent1e0a91fe81cd8cf38603c7147ebf2e79301be6f5 (diff)
downloadsqlalchemy-ad231da3b83bcdad4446690fa37fbe03408a40d6.tar.gz
- merge() may actually work now, though we've heard that before...
- merge() uses the priamry key attributes on the object if _instance_key not present. so merging works for instances that dont have an instnace_key, will still issue UPDATE for existing rows. - improved collection behavior for merge() - will remove elements from a destination collection that are not in the source. - fixed naive set-mutation issue in Select._get_display_froms - simplified fixtures.Base a bit
Diffstat (limited to 'lib/sqlalchemy/sql/expression.py')
-rw-r--r--lib/sqlalchemy/sql/expression.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py
index 2cd10720a..758f75ebe 100644
--- a/lib/sqlalchemy/sql/expression.py
+++ b/lib/sqlalchemy/sql/expression.py
@@ -3096,9 +3096,9 @@ class Select(_SelectBaseMixin, FromClause):
if self._froms:
froms.update(self._froms)
-
- for f in froms:
- froms.difference_update(f._hide_froms)
+
+ toremove = itertools.chain(*[f._hide_froms for f in froms])
+ froms.difference_update(toremove)
if len(froms) > 1 or self.__correlate:
if self.__correlate: