]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
merged the remainder of r6023 from trunk
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 13 Jun 2009 03:37:59 +0000 (03:37 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 13 Jun 2009 03:37:59 +0000 (03:37 +0000)
CHANGES
lib/sqlalchemy/orm/query.py

diff --git a/CHANGES b/CHANGES
index 972d5451a14b641a4800f3c71682d03a5de467c8..9a4596c72fcae0e7528358c8085c02735db1b1f8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -18,6 +18,15 @@ CHANGES
       wouldn't be deserialized correctly when the whole object
       was serialized.  [ticket:1426]
 
+    - Fixed Query being able to join() from individual columns of
+      a joined-table subclass entity, i.e.
+      query(SubClass.foo, SubcClass.bar).join(<anything>).
+      In most cases, an error "Could not find a FROM clause to join 
+      from" would be raised. In a few others, the result would be 
+      returned in terms of the base class rather than the subclass - 
+      so applications which relied on this erroneous result need to be 
+      adjusted. [ticket:1431]
+      
 - sql
     - Removed an obscure feature of execute() (including connection,
       engine, Session) whereby a bindparam() construct can be sent as 
index d045c7575a9f1218af2fbe4a2efa0934d5ff012d..856c9d5f72b47420429f6b1ccfc45bd92de481fa 100644 (file)
@@ -903,7 +903,7 @@ class Query(object):
         # after the method completes,
         # the query's joinpoint will be set to this.
         right_entity = None
-
+        
         for arg1 in util.to_list(keys):
             aliased_entity = False
             alias_criterion = False
@@ -973,6 +973,10 @@ class Query(object):
                         clause = ent.selectable
                         break
 
+            # TODO:
+            # this provides one kind of "backwards join"
+            # tested in test/orm/query.py.
+            # remove this in 0.6
             if not clause:
                 if isinstance(onclause, interfaces.PropComparator):
                     clause = onclause.__clause_element__()