]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Added some additional data to exception raised in PropertyLoader,_get_direction when...
authorRobert Leftwich <rtl@pobox.com>
Sun, 18 Jun 2006 22:16:36 +0000 (22:16 +0000)
committerRobert Leftwich <rtl@pobox.com>
Sun, 18 Jun 2006 22:16:36 +0000 (22:16 +0000)
lib/sqlalchemy/orm/properties.py

index e56350cecbfcac480e1081640fac7efc57d1aba2..a6125c89433556167b5938ce50e1dcd52caa19e8 100644 (file)
@@ -276,7 +276,7 @@ class PropertyLoader(mapper.MapperProperty):
         elif len([c for c in self.foreignkey if self.parent.unjoined_table.corresponding_column(c, False) is not None]):
             return sync.MANYTOONE
         else:
-            raise exceptions.ArgumentError("Cant determine relation direction " + repr(self.foreignkey))
+            raise exceptions.ArgumentError("Cant determine relation direction '%s', for '%s' in mapper '%s' with primary join\n '%s'" %(repr(self.foreignkey), self.key, str(self.mapper), str(self.primaryjoin)))
             
     def _find_dependent(self):
         """searches through the primary join condition to determine which side