-->
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.  [ 3 posts ] 
Author Message
 Post subject: Advise: Looking for some kind of object versioning solution
PostPosted: Mon Aug 14, 2006 6:41 pm 
Beginner
Beginner

Joined: Wed Oct 19, 2005 3:30 pm
Posts: 25
I'm looking for a way to retain a copy of an object and yet tie it to the original object. The best word I can use is versioning objects so I can see their history. The only way I've thus far figured out how to do this is to create a composite id consiting of an 2 incremented numbers so that when object 101-00 is updated it is actualy copied and saved to 101-01. The documention however warns against using composite keys at all and it seems like there should be a more elegant solution to this. Any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 07, 2006 1:16 pm 
Beginner
Beginner

Joined: Wed Oct 19, 2005 3:30 pm
Posts: 25
Still looking for help on this.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 08, 2006 8:00 pm 
Senior
Senior

Joined: Sat Nov 27, 2004 4:13 am
Posts: 137
We had the same problem:

You must have a logical key (which is unique in recent data) and an actual key in your table.

Then create a view which returns newest valid data, and map both the table and view...

use HQL to find anything you want.

_________________
don't forget to credit!

Amir Pashazadeh
Payeshgaran MT
پايشگران مديريت طرح
http://www.payeshgaran.co
http://www.payeshgaran.org
http://www.payeshgaran.net


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

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.