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: Create Identity Generator Programatically?
PostPosted: Tue Mar 24, 2009 10:06 pm 
Newbie

Joined: Wed Nov 01, 2006 12:08 pm
Posts: 2
Here is my scenario. In a production/qa environment I do not want my application to be able to insert into a table (only select/update).

For this reason, our POJOs are not annotated with an id generator. On the flip side, I would like to make use of the id generator during unit test execution. Is there a way to programatically add the id generator for an entity once the session factory has been created? I am using Oracle and would like to use a sequence to create test data.

Any other ideas on how to achieve the same result?

Thanks,

jp4


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.