-->
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: Generating IDs and import.sql
PostPosted: Mon Jul 30, 2007 3:48 pm 
Beginner
Beginner

Joined: Fri Jul 28, 2006 12:01 pm
Posts: 21
I am using Hypersonic DB during development and plan to switch over to Oracle at a future date. I will be working with new data in Oracle and plan to use sequences to generate ids for all my tables. In development I have been using import.sql to load some test data into HSQL. My question is how should I go about using some auto generation strategy for primary keys when seeding my database with test data?

Note: I am Hibernate for JPA

Should I just find my highest valued id in the test data and use a Table Generation strategy with the value in the table set higher than my biggest id in the test data?

Is there some way to use the generation strategy in my insert statements inside import.sql similar to how Oracle sequences work sequence_name.next_val()?

How have others tackled this?

Thanks


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.