-->
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.  [ 3 posts ] 
Author Message
 Post subject: hbm2java question
PostPosted: Tue Feb 15, 2005 9:30 am 
Newbie

Joined: Thu Feb 03, 2005 11:40 pm
Posts: 8
Hi,

I generated my .hbm.xml files with Middlegen from an Oracle table. I can see that a property of type Timestamp has been generated. When I run hbm2java, the generated .java class has this property of type Date. How can I get the property to be of type Timestamp rather than Date?

Thanks,
Vladimir


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 16, 2005 5:00 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
if you really want that then read the docs and find out about <meta> tags.

With that you can see that by adding
<meta attribute="property-type">javax.sql.Timestamp</meta>
you can overwrite it (but i dont know/think middlegen supports that directly)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 16, 2005 4:58 pm 
Newbie

Joined: Thu Feb 03, 2005 11:40 pm
Posts: 8
Max,

Actually, Middlegen generates something like:

<property name="reminded" type="java.sql.Timestamp" column="reminded" length="7"/>

and what I get after I run hbm2java is:

private Date reminded;

I would have expected something like:

private Timestamp reminded;

Thanks,
Vladimir


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