Hibernate Tools - "version" column
I am trying to generate the entites from my table using Hibe开发者_开发技巧rnate Tools. I can do this successfully with one small gotcha.
Each of the tables (100+) have a column called "version" which is a timestamp. When I generate the entites I have get an attribute in the class called version (with accessor and mutator methods) which is good. However there is no annotation on the attribute such as @Column(name="version"). I can script this into each of the java files but was wondering if there is a way to configure the tool to support this?
Anybody any ideas?
Thanks...
@Column(name="version")
is not necessary in this case because hibernate assumes that your column is named as it's field when no @Column
annotation is present.
精彩评论