Hello all,
I'm using eclipse 3.5 and hibernate tools v3.2.4 to generate JPA annotated entites from a SQL Server 2008 database using MS sqljdbc4.jar JDBC driver.
For some reason on one column hibernate code generation allways generates @Version annotation:
Code:
@Version
@Temporal(TemporalType.DATE)
@Column(name = "Timestamp", nullable = false)
public Date getTimestamp() {
return this.timestamp;
}
Column "Timestamp" is designed with SQL Server 2008 type "date" on db server side.
I also have a type-mapping defined for this column in my hibernate.reveng.xml file:
Code:
<table catalog="catalog" schema="dbo" name="Table" class="db.Table">
<primary-key>
<generator class="identity"></generator>
</primary-key>
<column name="Timestamp" jdbc-type="NVARCHAR" type="date"></column>
</table>
Is there a way to prevent generation of @Version attribute ?
Why does it get generated in the first place (am I doing something wrong) ?
Regards,
Mario