-->
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: named parameters and PostgreSQL's cast operator (conflict)
PostPosted: Thu Feb 12, 2004 7:29 pm 
Regular
Regular

Joined: Wed Dec 31, 2003 4:26 am
Posts: 108
Location: Berkeley, CA
I'm trying to use Postgres' very robust cast operator. The general format is:
some_value::cast-to-type

The problem is that the colons are interpreted (even in a sqlQuery) by hibernate as named parameters. Ooops. Other than explicit calling of specific postgres cast operators/functions is there a general work-around? Is there a way to ask Hibernate to be less agressive in parsing SQL that is not HQL?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 13, 2004 4:21 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Try to use "CAST( some_value AS cast-to-type )" it is not postgresql specific.


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.