diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-02-11 15:43:52 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-02-11 15:43:52 +0000 |
commit | 4358dd7551b68087c2d28661570f3647f13442df (patch) | |
tree | df67b5c83ecbeca2ccc053ca5338b3b8fc053161 /lib/sqlalchemy/mapping/properties.py | |
parent | 9323e70225d93971e598ffeeb6cf7c86fa9cbe2e (diff) | |
download | sqlalchemy-4358dd7551b68087c2d28661570f3647f13442df.tar.gz |
put assertion in to check for secondary table if secondaryjoin explicit
Diffstat (limited to 'lib/sqlalchemy/mapping/properties.py')
-rw-r--r-- | lib/sqlalchemy/mapping/properties.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/mapping/properties.py b/lib/sqlalchemy/mapping/properties.py index 61bb3da36..01c0921b7 100644 --- a/lib/sqlalchemy/mapping/properties.py +++ b/lib/sqlalchemy/mapping/properties.py @@ -164,6 +164,8 @@ class PropertyLoader(MapperProperty): self.key = key self.parent = parent + if self.secondaryjoin is not None and self.secondary is None: + raise ValueError("Property '" + self.key + "' specified with secondary join condition but no secondary argument") # if join conditions were not specified, figure them out based on foreign keys if self.secondary is not None: if self.secondaryjoin is None: |