I am trying to update the entity we don’t have any change or update in the code this error occurred in session.flush()
for updating. here is hibernate update query :
update tableName set business.id=:bizId, name=:name, post.id=:post, version=:version_1 ,content=:content where id=:id and version=:version_2
and this error occurred :
ORA-01483: invalid length for DATE or NUMBER bind variable
but when I write SQL query or run query in SQL developer no error occurred.
I change hibernate query to below and also worked fine without error :
update tableName set business.id=:bizId, name=:name, post.id=:post, content=:content, version=:version_1 where id=:id and version=:version_2
is there any problem ? how can I fix it !
here is pom.xml related to hibernate and oracle
<dependency>
<groupId>oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-core -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.3.6.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-ehcache -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>4.3.6.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-c3p0 -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>4.3.6.Final</version>
</dependency>