-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Version column required as part of composite key
PostPosted: Thu Oct 25, 2007 1:58 pm 
Newbie

Joined: Tue Aug 28, 2007 3:35 pm
Posts: 7
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.