java - Can't insert null to database with hibernate -


when save object via spring repository, if 1 of properties null, error ora-00932: inconsistent datatypes: expected number got binary. error doesn't bother me thing can't insert null values, though column in database of type number , it's nullable.

i tried declare properties in model class both primitives , wrappers, neither worked.

model:

@component public class someclass implements serializable {  private static final long serialversionuid = 3896054726397666655l;  private int prop1; private integer prop2; } 

cfg.xml file:

 <hibernate-mapping>  <class name="someclass" table="some_table">   <id name="id" type="int" column="id">      <generator class="increment"/>   </id>   <property name="prop1" column="prop1" type="int" not-null="false"/>   <property name="prop2" column="prop2" type="int"/> 


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -