diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-07-19 20:38:43 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-07-19 20:38:43 +0000 |
| commit | 219730da27622f86e60db5be1dc179168614e5bc (patch) | |
| tree | cb3d7f2e4822187adc01195146c087f6df4fad11 | |
| parent | f4415c21c57dd2caa8638b4e7f9670a9f563e88c (diff) | |
| download | sqlalchemy-219730da27622f86e60db5be1dc179168614e5bc.tar.gz | |
reduced bind param size in query._get to appease the picky oracle
[ticket:244]
| -rw-r--r-- | CHANGES | 2 | ||||
| -rw-r--r-- | lib/sqlalchemy/orm/query.py | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -42,6 +42,8 @@ do_init() method is called on all properties now which are more aware of their "inherited" status if so. - eager loads explicitly disallowed on self-referential relationships, or relationships to an inheriting mapper (which is also self-referential) +- reduced bind param size in query._get to appease the picky oracle +[ticket:244] 0.2.5 - fixed endless loop bug in select_by(), if the traversal hit diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py index 5006b8ad4..8e87ac09a 100644 --- a/lib/sqlalchemy/orm/query.py +++ b/lib/sqlalchemy/orm/query.py @@ -26,7 +26,7 @@ class Query(object): if not hasattr(self.mapper, '_get_clause'): _get_clause = sql.and_() for primary_key in self.mapper.pks_by_table[self.table]: - _get_clause.clauses.append(primary_key == sql.bindparam("pk_"+primary_key._label, type=primary_key.type)) + _get_clause.clauses.append(primary_key == sql.bindparam(primary_key._label, type=primary_key.type)) self.mapper._get_clause = _get_clause self._get_clause = self.mapper._get_clause def _get_session(self): @@ -280,7 +280,7 @@ class Query(object): i = 0 params = {} for primary_key in self.mapper.pks_by_table[self.table]: - params["pk_"+primary_key._label] = ident[i] + params[primary_key._label] = ident[i] # if there are not enough elements in the given identifier, then # use the previous identifier repeatedly. this is a workaround for the issue # in [ticket:185], where a mapper that uses joined table inheritance needs to specify |
