oracle - inconsistent datatypes expected DATE got BINARY Hiberante Spring Data JPA -


 <named-query name="category.getids1">     <query>     <![cdata[         select spov.versionid         specificationcategoryversion spov         ?1 null or spov.releasedate null]]>              </query> </named-query>  <named-query name="category.getids2">     <query>     <![cdata[         select spov.versionid         specificationcategoryversion spov         ?1 null or spov.releasedate <=  ?1                  ]]>              </query> </named-query>  <named-query name="category.getids3">     <query>     <![cdata[         select spov.versionid         specificationcategoryversion spov         ?1 null or spov.releasedate null or spov.releasedate <=  ?1                  ]]>              </query> </named-query>     @repository("specificationcategoryrepository")    public interface specificationcategoryrepository extends    jparepository<specificationcategory, long>{    ...    @query(name = "category.getids1") list<string> getids1(date validon);  @query(name = "category.getids2") list<string> getids2(date validon);  @query(name = "category.getids3") list<string> getids3(date validon);  } 

when 3 methods invoked null, getids1 works expected,

but getids2, getids3 raise following complain:

sql error: 932, sqlstate: 42000 ora-00932: inconsistent datatypes: expected date got binary 

amazingly, respective native sqls:

select specificat0_.version_id col_0_0_   spec_category_version specificat0_  ? null or specificat0_.release_date<=? 

and

select specificat0_.version_id col_0_0_  spec_category_version specificat0_  ? null      or specificat0_.release_date null      or specificat0_.release_date<=? 

works when '?' replaced null.

btw, spec_category_version.release_date nullable

environment

db: oracle database 12c enterprise edition release 12.1.0.2.0 - 64bit production pl/sql release 12.1.0.2.0 - production "core 12.1.0.2.0 production" tns linux: version 12.1.0.2.0 - production nlsrtl version 12.1.0.2.0 - production

java: java version "1.7.0_07" java(tm) se runtime environment (build 1.7.0_07-b10) java hotspot(tm) 64-bit server vm (build 23.3-b01, mixed mode)

server: red hat jboss enterprise application platform - version 6.3.3.ga

dialect :hhh000400: using dialect: org.hibernate.dialect.oracle10gdialect

version :hv000001: hibernate validator 4.3.1.final-redhat-1

any in regard more welcome.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -