java - Hibernate updating Null Values to dynamic updatable table -
here problem facing.
i have table not-null field create_date. dont want update particular column when update done in table. gave
dynamic-insert="true" dynamic-update="true"
in table hbm.xml. problem getting error trying update null not-null field though not modifying object. pasting code here.
if (userdo.getuserid() != null) { if(sessionmanager.getinstance().currentsession() != null){ getsession().evict(userdo); getsession().clear(); } getsession().update(userdo); //getsession().saveorupdate(userdo); }
in domain class above field don't want store null set:
@column (nullable = false)
Comments
Post a Comment