-->
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: hibernate-reverse-engineering
PostPosted: Sat Sep 19, 2009 7:24 pm 
Newbie

Joined: Sat Sep 19, 2009 6:59 pm
Posts: 1
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>


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.