-->
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: casting values as "time" in hql
PostPosted: Wed Feb 16, 2011 9:38 am 
Newbie

Joined: Sat Jun 04, 2005 2:35 pm
Posts: 7
We have an HQL query that we are trying to run which utilizes a cast operation in the where clause. Effectively "cast(x as time)" where x is an int column in a postgres database. For all other cast types (long, date, whatever) this code seems to translate just fine, but for "time" it always prepends the column name with some alias (I think it is the table). So what ends up getting passed into the CastFunction.render is "mytable0_.time" and when Hibernate tries to find the type for this in TypeResolver.heuristicType it chokes and throws out an NPE. Other types end up getting passed in as just their type (long, date, whatever) but time doesn't.

I was going to try running the unit tests and send in a test that excersises this, but I am not able to build the unit tests (complaints about not finding maven-jdocbook-style-plugin).

Thanks in advance!


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.