Skip to content
Browse files

queryset-refactor: Fixed db column to model field mapping for Oracle …


Thanks, Justin Bronn. Fixed #7036.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent d4956cb commit c43a3d78b1a7c65b903922679c76a499e484dea5 @malcolmt malcolmt committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/db/backends/oracle/
4 django/db/backends/oracle/
@@ -28,8 +28,9 @@ class OracleQuery(QueryClass):
def resolve_columns(self, row, fields=()):
from django.db.models.fields import DateField, DateTimeField, \
TimeField, BooleanField, NullBooleanField, DecimalField, Field
+ index_start = len(self.extra_select.keys())
values = []
- for value, field in map(None, row, fields):
+ for value, field in map(None, row[index_start:], fields):
if isinstance(value, Database.LOB):
value =
# Oracle stores empty strings as null. We need to undo this in
@@ -111,7 +112,6 @@ def as_sql(self, with_limits=True):
# not get the attribute on the returned models.
self.extra_select['rn'] = 'ROW_NUMBER() OVER (ORDER BY %s )' % rn_orderby
sql, params= super(OracleQuery, self).as_sql(with_limits=False)
- self.extra_select.pop('rn')
# Constructing the result SQL, using the initial select SQL
# obtained above.

0 comments on commit c43a3d7

Please sign in to comment.
Something went wrong with that request. Please try again.