-->
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: [help]flexibility of id-generator for different sql dialects
PostPosted: Wed Apr 25, 2007 6:24 pm 
Newbie

Joined: Wed Apr 25, 2007 6:11 pm
Posts: 2
Hi all,
Our development requires to change database instances back and forth between Oracle10g and SQLServer. My question is, is there a way of some sort of conditional statement that allow multiple id-generator? or something that will take a parameter of the database type??
here's a snippet of my mapping file:
<id
name="id"
column="LOCKED_ID"
type="java.lang.Long"
unsaved-value="-1"
>

<!-- Oracle 10g Implementation -->
<!--<generator class="sequence">-->
<!--<param name="sequence">LOCKED_ID_SEQ</param>-->
<!--</generator>-->

<!--SQL Server Implementation-->
<generator class="native"></generator>
</id>


Instead of commenting and uncommenting this part, is there a dynamic way of doing this?

Thanks in advance,

Gerald


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 08, 2007 2:49 am 
Newbie

Joined: Thu Nov 04, 2004 1:30 am
Posts: 2
Location: India
Did you get the solution for this problem?


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 08, 2007 12:23 pm 
Newbie

Joined: Wed Apr 25, 2007 6:11 pm
Posts: 2
No dynamic solution yet. (Currently, it's just being hard coded differently with different deployment)


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.