Hibernate version: 3.2.4.sp1
Mapping documents: Using annotations
Name and version of the database you are using: Microsoft SQL Server 2005
I am using Hibernate through JPA and would like to have values for a certain non-key persistent field be automatically generated based on an @GeneratedValue and @TableGenerator. However, it does not work. The value in the concerned column in the database is always 0 (zero) in every row.
Is it really possible to generate values for non-key column using @GeneratedValue? Is there something special to be done to get it working?
A search in the forums gave me
http://forum.hibernate.org/viewtopic.php?t=968325, which is interesting but not really specifically about @GeneratedValue.
FWIW,
http://www.manning-sandbox.com/thread.jspa?threadID=23932 is another place where I am trying to get some closure on this
Thanks in advance.