Hi,
I have a situation where a Class B extends Class A and the additional attributes provided by Class B are stored in a separate database table using the <joined-subclass> tag in Hibernate config.
Class A has typical KEY and VERSION attributes with versioning being managed by Hibernate.
Since Class B is joined by KEY, its table also has the KEY column.
However, I would like Class B's table to also contain a copy of the VERSION column - the version is essentially part of the primary key for both classes.
Any help on how I can achieve this?
Can I define a composite key including the version column, and yet still allow Hibernate to manage versioning using the same column?
Many thanks,
Chris
|