-->
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: typecasting in SQLQuery with PostgreSQL
PostPosted: Thu Jan 29, 2009 12:41 pm 
Newbie

Joined: Wed Sep 10, 2008 2:02 pm
Posts: 14
Location: NJ
I have a sql-query defined as follows:

select * from Billing b where b.datecharged::date = :forDate

The datecharged column is defined as a timestamp.

When I get the named query from the session, it thinks it takes two parameters, namely, :date and :forDate.

I searched the forum but didn't find anything in regard to this.

I don't see anything in any documentation that acknowledges that this might be a problem.

I will work around it, but I would think this would be considered a bug.

Hibernate version: Core: 3.2.6ga

Full stack trace of any exception that occurs:

Name and version of the database you are using: PostgreSQL v 8.0.311


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2009 12:29 pm 
Regular
Regular

Joined: Fri Jan 30, 2009 10:10 am
Posts: 74
Location: London
Looks like the Spring guys had the same issue reported to them in March 2008:

http://jira.springframework.org/browse/SPR-4612


--
Stephen Souness


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.