Joined: Sat Jun 21, 2008 12:16 pm Posts: 3
|
I have a property mapped like following
<property name="xxx" column="xxx" insert="false" />
<property name="yyy" column="yyy"/>
And in the database the column has not-null constraint and default value as 'Y'
But when i do getHibernatetemplate().save(obj), value for that column goes in as null. whereas i expected that column not to be part of insert SQL and would automatically be assigned with the default value of 'Y'.
Like behave the same way as when the following query is executed
insert into TABLE (yyy) values ("YYY") which would put xxx=>'Y' and yyy=>'YYY' in the database.
Thanks
|
|