diff options
| author | Robert Leftwich <rtl@pobox.com> | 2006-06-18 22:16:36 +0000 |
|---|---|---|
| committer | Robert Leftwich <rtl@pobox.com> | 2006-06-18 22:16:36 +0000 |
| commit | f5c5c4e6a7041d10a83719a572b823d8cfbebb6c (patch) | |
| tree | aae72eef1addfd19c7b89142a271ca7d09e118c6 | |
| parent | 69549460f79975c71007accfd219e9e18f6f09c2 (diff) | |
| download | sqlalchemy-f5c5c4e6a7041d10a83719a572b823d8cfbebb6c.tar.gz | |
Added some additional data to exception raised in PropertyLoader,_get_direction when cannot determine the direction to specify exactly which relation failed.
| -rw-r--r-- | lib/sqlalchemy/orm/properties.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py index e56350cec..a6125c894 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 |
