-->
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.  [ 4 posts ] 
Author Message
 Post subject: hibernate.reveng.xml Clob Mapping
PostPosted: Mon Aug 08, 2005 6:03 am 
Newbie

Joined: Mon Aug 08, 2005 5:57 am
Posts: 6
I currently am getting Clob objects mapped into java.lang.Objects in the reverse engineered code. I have done the following with the hibernate.reveng.xml file:

Code:
<?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>

    <type-mapping>
        <sql-type jdbc-type="CLOB" hibernate-type="CLOB"/>
    </type-mapping>

</hibernate-reverse-engineering>


Any item in the DB of type Clob still comes back as java.lang.Object in the generated code.

Anyone got any ideas?

Cheers.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 08, 2005 6:51 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
the hibernate type should be "clob" not "CLOB"

and maybe the jdbc type is not CLOB when read from the database?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 08, 2005 6:56 am 
Newbie

Joined: Mon Aug 08, 2005 5:57 am
Posts: 6
max wrote:
the hibernate type should be "clob" not "CLOB"

and maybe the jdbc type is not CLOB when read from the database?


I have changed the hibernate type to clob and checked the DB, Oracle reports the column as type CLOB. After running the script again I get no errors but the resulting output does not change from java.lang.Object.

Code:
<property name="igsimgdata" type="java.lang.Object">
            <column name="IGSIMGDATA" />
        </property>
        <property name="igspimgdata" type="java.lang.Object">
            <column name="IGSPIMGDATA" />


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 08, 2005 7:38 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hmm...if its alpha4 i think length also is required. cvs should work without length.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.