#34060: Creating CheckConstraint on JSONField with __exact lookup on key
transforms
crashes on Oracle.
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 4.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: Oracle | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by r4ge):
Hi, I may be wrong as this I am just new to this.
The issue seems to be here "/backends/oracle/operations.py"
{{{
def lookup_cast(self, lookup_type, internal_type=None):
if lookup_type in ("iexact", "icontains", "istartswith",
"iendswith"):
return "UPPER(%s)"
if internal_type == "JSONField" and lookup_type == "exact":
return "DBMS_LOB.SUBSTR(%s)"
return "%s"
}}}
The condition might be
{{{
if internal_type != "JSONField" and lookup_type == "exact": # if the type
is not JSONField
}}}
Can I pick this up?
--
Ticket URL: <https://code.djangoproject.com/ticket/34060#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070187456822a1-e0eae69c-f9fe-42c0-bd9e-40c3dca4f214-000000%40eu-central-1.amazonses.com.