Hi All, I am using hibernatetool to generate ejb 3 entities classes from database tables. For few tables I want to do exclusive sql type mapping. when I tried table specific mapping, it seems this is not working. could anybody have the clue? see below configuration file. I am just trying to configure mapping for mail_queue and mail_detail tables but hibernate-tool is not converting blob/clob into file/String type(red color). although, if I map same in <type-mapping> tag (blue color) , this is working fine, but this affecting some other entity classes also that I don't want, so I am looking table specific sql type mapping solution anybody's help would be highly regarded
------------------------------------------hibernate-reveng.xml------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-reverse-engineering SYSTEM "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
<hibernate-reverse-engineering>
<!-- <schema-selection match-schema="LPR_JPA_GENERATE"/> -->
<type-mapping>
<sql-type jdbc-type="INTEGER" not-null="true" hibernate-type="java.lang.Long"/> <sql-type jdbc-type="INTEGER" not-null="false" hibernate-type="java.lang.Long"/>
<!--<sql-type jdbc-type="BLOB" hibernate-type="java.io.File"/>--> </type-mapping> <table name="mail_queue"> <column name="BODY" jdbc-type="CLOB" type="java.lang.String"/>
</table> <table name="mail_detail"> <column name="ATTACHMENT" jdbc-type="BLOB" type="java.io.File"/>
</table>
<!-- this was needed before we changed from "long" to "Long" for all INTEGER columns -->
</hibernate-reverse-engineering>
|