Hi all,
I am having this problem with generating the value for a column.
I have a java bean with an attribute called "createDate" having type as Timestamp.
I have mapped this property in the .hbm.xml file as
<property name="createDate" column="create_date" update="false" type="timestamp" generated="insert"/>
I want the value for this column to be generated at insert time,as the current date time value.
The problem is with the generated="insert". If I include this in the mapping file, this is the error i am getting
Attribute "generated" must be declared for element type "property".
The Doctype declaration is as follows:
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
Any solutions on this.
Thanks in advance for the help.
I am having this problem with generating the value for a column.
I have a java bean with an attribute called "createDate" having type as Timestamp.
I have mapped this property in the .hbm.xml file as
<property name="createDate" column="create_date" update="false" type="timestamp" generated="insert"/>
I want the value for this column to be generated at insert time,as the current date time value.
The problem is with the generated="insert". If I include this in the mapping file, this is the error i am getting
Attribute "generated" must be declared for element type "property".
The Doctype declaration is as follows:
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
Any solutions on this.
Thanks in advance for the help.