[
http://opensource.atlassian.com/projects/hibernate/browse/HBX-981?page=co...
]
Max Rydahl Andersen closed HBX-981.
-----------------------------------
Resolution: Fixed
Fix Version/s: 3.2beta10
please try with later version.
HBM2JAVA w/ ejb3=true does not generate @Version annotation
------------------------------------------------------------
Key: HBX-981
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HBX-981
Project: Hibernate Tools
Issue Type: Bug
Components: hbm2java
Affects Versions: 3.2beta9
Environment: hibernate tools 3.2beta9
Reporter: Parker Whirlow
Fix For: 3.2beta10
When using the HBM2JAVA tool with 'ejb3=true' to generate EJB annotations, the
<version> hibernate mapping doesn't get mapped as a version @Version in the
resulting java class. See below:
Mapping document:
<hibernate-mapping package="com.company.ejb3.entity">
<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>
Resulting Person.java snippet:
@Column(name="update_dt", nullable=false)
public Date getLastUpdateDT() {
return this.lastUpdateDT;
}
public void setLastUpdateDT(Date lastUpdateDT) {
this.lastUpdateDT = lastUpdateDT;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira