#24367: ORA-00918 (column ambiguously defined) when using a combination of
slicing,
distinct, and order_by
-------------------------------------+-------------------------------------
Reporter: skoot | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 1.7
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: ORA-00918 oracle | Triage Stage:
queryset | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):
* status: new => closed
* resolution: => fixed
Comment:
Hey Kishor, could you try reproducing without using `extra`? I suspect
this is the origin of your issue here as `id` could be ambiguous in your
subquery's context.
The `sysdate - (schedule_frequency/1440)` could be replaced by something
along `schedule_next_run_time__gt=(Func(template='sysdate') -
(F('schedule_frequency')/1440))` and the `owner_id IN` part by
`owner_id__in=...`.
I'll reset this ticket as fixed because while you have the same symptoms
as the initial report (`ORA-00918 (column ambiguously defined)`) you are
not using `slicing`, `distinct`, or `order_by` which is what this ticket
is about.
If you manage to reproduce a similar failure without using `extra()`
please submit a new ticket with reproduction steps.
--
Ticket URL: <https://code.djangoproject.com/ticket/24367#comment:7>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/063.4341df7bcb3d0b19eca6b14a29ce5d76%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.