RawQuerySet doesn't call ops.convert_values in the backend
|Reported by:||Ian Kelly||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Cc:||Matt Boersma||Triage Stage:||Accepted|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Because RawQuerySet doesn't invoke the sql compiler, the
ops.convert_values method in the Oracle backend never gets called. As a result, several values come through in the wrong format -- most notably, TextField values get pulled in as a cx_Oracle LOB object rather than as a Unicode string.
The complication with just adding a call to the method is that when using the other backends, it only ever gets called in an aggregation query. Outside of this context, it breaks. The method needs a closer examination to determine when it should be called and exactly what it should be doing.
Also, we need a test case for this. The existing raw_query tests miss it.
Change History (10)
comment:1 Changed 7 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Accepted|