-->
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: unix_timestamp hibernate 3.2 problem
PostPosted: Fri Jan 12, 2007 3:41 pm 
Newbie

Joined: Fri Mar 17, 2006 3:54 pm
Posts: 6
With hibernate 3.2. I am using an HQL query. It has no problem accepting mysql's "unix_timestamp" function. However, it fails miserably when using a DB other than MYSQL. My question is two fold

1. If HQL query does not really support unix_timestamp() why does it allow it with my sql (this is not a native query after all!)

2. Can anybody suggest an alternative to a HQL db agnostic query that currently does something like this in mysql:

AVG(UNIX_TIMESTAMP(Q1.createTime)-UNIX_TIMESTAMP(Q2.createTime)) AS AVG

Thanks for any input/feedback


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.