We have an environment where we use both SQL*Server and Oracle.
Currently I have 1 set of mapping files, for oracle.
The SQL*Server mapping is largely the same, but, I need to change things like
<property name="Data" type="com.mine.hbm.OracleXmlUserType" not-null="false">
to be
<property name="Data" type="string" not-null="false">
<column name="DATA" sql-type="xml"/>
</property>
I can do this by having a parallel set of mapping files. Or I could generate the 2 files from a 'master file' at build time (e.g. ANT property replacement, XSLT, etc). Both feel a bit icky - is there any easier way to do this, perhaps property replacement in the hbm mapping file, conditional includes or something like that?
|