]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
reduced bind param size in query._get to appease the picky oracle
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 19 Jul 2006 20:38:43 +0000 (20:38 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 19 Jul 2006 20:38:43 +0000 (20:38 +0000)
[ticket:244]

CHANGES
lib/sqlalchemy/orm/query.py

diff --git a/CHANGES b/CHANGES
index f96d321c5eca972a8d26649f323029133d891634..86a65d7284bf1a0d724526c5d55cf7d13a8bc2ff 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -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
index 5006b8ad4d6387affc385091faf5fe16747fe8cb..8e87ac09a75855939877d64e029e55250c5fa21f 100644 (file)
@@ -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