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
|