Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate Tools version: 3.2.0Beta9
Mapping documents:
Code:
<class name="Person" table="person">
<id column="id" length="22" name="id" type="string"></id>
<version type="timestamp" name="lastUpdateDT" column="update_dt" generated="never" unsaved-value="null" />
<property name="name" column="name" not-null="true" type="string" length="150" />
</hibernate-mapping>
When I use the HBM2JAVA tool with the 'ejb' setting to generate EJB annotations, the <version> mapping doesn't get mapped as a version @Version in the resulting java class. See below:
Code:
@Column(name="update_dt", nullable=false)
public Date getLastUpdateDT() {
return this.lastUpdateDT;
}
public void setLastUpdateDT(Date lastUpdateDT) {
this.lastUpdateDT = lastUpdateDT;
}
Am I doing something wrong, or does the mapping of Version properties not work with HBM2JAVA?
thanks,
Parker