yes, as far as i know Hibernate will not populate the value when used with a composite PK.
To enable that behavior you have to define some custom classes, etc..
anonymous wrote : We regard this as an extremely strange thing to want to do. If you have
a generated surrogate key, why not just make it be the primary key?
|
| However, if you must do this, you can do it by writing a CompositeUserType for the
composite identifier class, and then defining a custom IdentifierGenerator that populates
the generated value into the composite key class.
http://www.hibernate.org/117.html?cmd=prntdoc
Under the question: "I have a composite key where one column holds a generated
value...?"
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070693#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...