From: Robert Leftwich Date: Sun, 18 Jun 2006 22:16:36 +0000 (+0000) Subject: Added some additional data to exception raised in PropertyLoader,_get_direction when... X-Git-Tag: rel_0_2_4~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f5c5c4e6a7041d10a83719a572b823d8cfbebb6c;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Added some additional data to exception raised in PropertyLoader,_get_direction when cannot determine the direction to specify exactly which relation failed. --- diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py index e56350cecb..a6125c8943 100644 --- a/lib/sqlalchemy/orm/properties.py +++ b/lib/sqlalchemy/orm/properties.py @@ -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