#28859: Django hides NO_DATA_FOUND exception from database with Oracle backend.
-------------------------------------+-------------------------------------
     Reporter:  Jani Tiainen         |                    Owner:  felixxm
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  2.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 Jani Tiainen):

 Replying to [comment:2 felixxm]:

 When testing using plain cx_Oracle exception is thrown correctly and
 visible on console.
 {{{
 $ ./manage.py shell

 In [1]: from django.db import connections

 In [2]: connections['default'].connect()

 In [3]: conn=connections['default'].connection   # Get plain cx_Oracle
 connection instead of Django wrappers

 In [4]: cur=conn.cursor()

 In [5]: cur.execute('INSERT INTO MYMODEL(ID) VALUES (1)')
 ---------------------------------------------------------------------------
 DatabaseError                             Traceback (most recent call
 last)
 <ipython-input-5-39d4fbf2986d> in <module>()
 ----> 1 cur.execute('INSERT INTO MYMODEL(ID) VALUES (1)')

 DatabaseError: ORA-01403: no data found
 ORA-06512: at "ORA_TEST.TG_FAILING", line 4
 ORA-04088: error during execution of trigger 'ORA_TEST.TG_FAILING'

 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28859#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/063.0a3e3f3ca297b505c4a18a2f23f4f09a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to