]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- fixed string-based "remote_side", "order_by" and
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 11 Dec 2008 15:34:45 +0000 (15:34 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 11 Dec 2008 15:34:45 +0000 (15:34 +0000)
others not propagating correctly when used in
backref().

CHANGES
lib/sqlalchemy/ext/declarative.py
lib/sqlalchemy/orm/properties.py

diff --git a/CHANGES b/CHANGES
index cc60fec7af3a03730b257edb612486132973dcaf..63ad11cc533321a095b4add34a51c547eaf3dfb8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -245,6 +245,10 @@ CHANGES
     - Can now use a custom "inherit_condition" in 
       __mapper_args__ when using declarative.
       
+    - fixed string-based "remote_side", "order_by" and 
+      others not propagating correctly when used in 
+      backref().
+      
 0.5.0rc3
 ========
 - features
index a2bd517e458dfc0cad943e295fbabd717cac2db0..70488eb07708fa4a7eaaf488ee3a8f027bf2a19a 100644 (file)
@@ -434,7 +434,7 @@ def _deferred_relation(cls, prop):
                 setattr(prop, attr, resolve_arg(v))
 
         if prop.backref:
-            for attr in ('primaryjoin', 'secondaryjoin'):
+            for attr in ('primaryjoin', 'secondaryjoin', 'secondary', '_foreign_keys', 'remote_side', 'order_by'):
                if attr in prop.backref.kwargs and isinstance(prop.backref.kwargs[attr], basestring):
                    prop.backref.kwargs[attr] = resolve_arg(prop.backref.kwargs[attr])
 
index 6404b8349efca6238f2c28437e1e454150b661fc..87ad6819e335b1e19bf7791d71738770b2687037 100644 (file)
@@ -805,7 +805,7 @@ class RelationProperty(StrategizedProperty):
                     self.local_remote_pairs = eq_pairs
         elif self.remote_side:
             raise sa_exc.ArgumentError("remote_side argument is redundant against more detailed _local_remote_side argument.")
-
+        
         for l, r in self.local_remote_pairs:
 
             if self.direction is ONETOMANY and not self._col_is_part_of_mappings(l):