-->
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: Saving unique reference data
PostPosted: Thu Feb 15, 2007 3:00 pm 
Newbie

Joined: Mon Oct 10, 2005 2:36 pm
Posts: 2
I am attempting to save unique reference data within a mysql database. This data does not change over time, but can be added to. Is there an intelligent way of doing this in hibernate?

Currently the test is to create the pojo, query by example, if it exists use that object, otherwise save it. This seems tedious especially if there's a large list of reference objects, some that exist and some that don't in the database.

Any ideas?

Thanks,
w

PS. A concrete example of one of the tables. A large table with URLs and ids referenced by a number of different tables. When a new object is persisted that references the URL it may or may not already be there, if it is it should reference the existing, if not it should create a new one.


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.