-->
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: Conrolling column "length" property
PostPosted: Fri Aug 03, 2007 7:21 pm 
Newbie

Joined: Fri Aug 03, 2007 6:19 pm
Posts: 1
Hibernate version:

3.2

Mapping documents:

See below

Name and version of the database you are using:

Oracle 9i Enterprise Edition 9.2.0.1.0

This is about reverse engineering Oracle TIMESTAMP columns using Eclipse Hibernate Console.

I looked at the docs here: http://www.hibernate.org/hib_docs/tools ... e/en/html/

I'm wondering if there is a way to control the "length" attribute of a column when you do reverse engineering. I looking in the docs under "Controlling reverse engineering," but it didn't say anything about how to do that.

I would like to know if there is a way to configure the reveng.xml file for this purpose.

When I do a reverse engineering I get this:
Quote:
<property name="created" type="timestamp">
<column name="CREATED" length="11" />
</property>


I need the length to be 36, otherwise the time of day value gets dropped when the date is stored.

I'm trying to get it so that I don't have to go in and tweak the generated .hbm.xml files by hand every time I run Hibernate code generation.

In reveng.xml, I tried setting an sql type like this:

<sql-type jdbc-type="TIMESTAMP" length="36"
hibernate-type="date" />

I also tried changing the scale and precision. There was no difference in the generated code.

Any help would be greatly appreciated.


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.