DescriptionRicardo Martinelli de Oliveira
2015-05-27 20:29:41 UTC
Description of problem:
Oracle returns ORA-00932: inconsistent datatypes: expected NUMBER got BINARY every time when passed null value to an INTEGER value.
The example code below uses Native Query:
String sql = "SELECT * FROM schema.Tabela WHERE integerColumn = ?"
Query query = getEntityManager().createNativeQuery(sql, classe);
query.setParameter(1, null);
query.getResultList(); //Error
Version-Release number of selected component (if applicable):
6.3.0
How reproducible:
Every time you set null in a query
Steps to Reproduce:
1. Download attachment testcase01451056
2. Follow instructions in READ-ME.txt file
3. Run the test case
Actual results:
It returns -00932: inconsistent datatypes: expected NUMBER got BINARY from Oeacl database
Expected results:
Native Query runs without any errors
Additional info: