-->
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.  [ 2 posts ] 
Author Message
 Post subject: current timestamp in hsql's select section
PostPosted: Tue Jan 10, 2006 6:06 pm 
Newbie

Joined: Fri May 21, 2004 5:30 pm
Posts: 3
In Hibernate 2.1 I have used current keyword in hsql to get current database timestamp (via query interface):
"select current, foo from .... ".

This doesn't work with Hibernate 3.0.x. Could somebody tell me how to do it in 3.0.x version?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 11, 2006 12:53 am 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
If "current" is a keyword in your database, then change your query to an sql-query. Hibernate will be treating it as an IDENT. If it really it used to be treated as a keyword in the appropriate dialect, have a look at the differences between the H2 and H3 dialect files.

BTW it's "HQL", not "HSQL". Or is HSQL the name of the language that your DB server uses?


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