-->
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: determine join columns when copying hibernate object
PostPosted: Wed Dec 23, 2009 11:52 am 
Regular
Regular

Joined: Thu Dec 10, 2009 10:53 am
Posts: 50
I'm working on a data versioning solution for hibernate. When I'm creating a new version of an existing object, I first copy all the information from the original object. For this I traverse the ClassMetadata information and copy the values using getPropertyValue and setPropertyValue.

When creating a new entry for any existing associations in join tables, I need to know which columns the original object joins with, i.e. if I join with jointable.a or jointable.b if the jointable is used for a-b joins. I've looked a Joinable, but that does not seem to contain what I want. Is there some better way than trying to infer join column strings based on class names (which wouldn't work in my current setup)?

Thanks,
Tim


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.