#29630: Admin interface causes ORA-00918: column ambiguously defined
-------------------------------------+-------------------------------------
     Reporter:  zelfor5436           |                    Owner:  nobody
         Type:  Uncategorized        |                   Status:  new
    Component:  Uncategorized        |                  Version:  2.1
     Severity:  Normal               |               Resolution:
     Keywords:  oracle, admin,       |             Triage Stage:
  exception                          |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by rafaelzinezi):

 * status:  closed => new
 * resolution:  needsinfo =>


Comment:

 Crossed the same problem. [https://pastebin.com/FaEp3wDa full traceback
 debug @pastebin]

 Was able to extract the offending query from traceback and found that when
 base.html runs it, in this case, it has multiple columns named ID (from 3
 tables: Django_Admin_Log, Auth_User and Django_Content_Type).
 by parsing and running the query in a sql script the same error occurs.
 by aliasing the columns it goes away.


 {{{
 SELECT          DJANGO_ADMIN_LOG.ID logid,
                 DJANGO_ADMIN_LOG.ACTION_TIME,
                 DJANGO_ADMIN_LOG.USER_ID,
                 DJANGO_ADMIN_LOG.CONTENT_TYPE_ID,
                 DJANGO_ADMIN_LOG.OBJECT_ID,
                 DJANGO_ADMIN_LOG.OBJECT_REPR,
                 DJANGO_ADMIN_LOG.ACTION_FLAG,
                 DJANGO_ADMIN_LOG.CHANGE_MESSAGE,
                 AUTH_USER.ID authid,
                 AUTH_USER.PASSWORD,
                 AUTH_USER.LAST_LOGIN,
                 AUTH_USER.IS_SUPERUSER,
                 AUTH_USER.USERNAME,
                 AUTH_USER.FIRST_NAME,
                 AUTH_USER.LAST_NAME,
                 AUTH_USER.EMAIL,
                 AUTH_USER.IS_STAFF,
                 AUTH_USER.IS_ACTIVE,
                 AUTH_USER.DATE_JOINED,
                 DJANGO_CONTENT_TYPE.ID contid,
                 DJANGO_CONTENT_TYPE.APP_LABEL,
                 DJANGO_CONTENT_TYPE.MODEL
 FROM DJANGO_ADMIN_LOG
         INNER JOIN AUTH_USER
                 ON (DJANGO_ADMIN_LOG.USER_ID = AUTH_USER.ID)
         LEFT OUTER JOIN DJANGO_CONTENT_TYPE
                 ON (DJANGO_ADMIN_LOG.CONTENT_TYPE_ID =
 DJANGO_CONTENT_TYPE.ID)
 ORDER BY DJANGO_ADMIN_LOG.ACTION_TIME DESC
 FETCH FIRST 10 ROWS ONLY
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29630#comment:4>
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/068.559e1b38c8d3eb6bb9869370b355520a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to