-->
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: interval DB type
PostPosted: Thu Sep 08, 2005 6:37 am 
Newbie

Joined: Thu Sep 08, 2005 4:49 am
Posts: 2
Hi All,

Does anybody know how Hibernate 3 handles interval data type that is returned as part of HQL query.
It seems that it tries to get it as Timestamp. Is it correct?

Thanks,
Gil


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 08, 2005 7:02 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Hibernate "tries to get it" based on however you have defined the corresponding property in terms of its type.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 08, 2005 11:24 am 
Newbie

Joined: Thu Sep 08, 2005 4:49 am
Posts: 2
steve wrote:
Hibernate "tries to get it" based on however you have defined the corresponding property in terms of its type.


This is clear, but what happens in HQL query with custom SELECT clause, for example

select o.date1 - o.date2 from mypackage.MyObject as o

where date1 and date2 are properties of MyObject of type Timestamp.
The database's type which is returned is an INTERVAL.

What is Hibernate expected to do in this situation (does it try to convert it to timestamp)?

Thanks,
Gil


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.