-->
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: hql comparison with BigDecimal
PostPosted: Sun May 02, 2004 3:29 pm 
Newbie

Joined: Mon Mar 29, 2004 1:08 pm
Posts: 10
What is the proper (and/or best) way to write an hql query that involves comparison with BigDecimal.

Im using postgresql. Hibernate stores BigDecimal as a bytea;
however, the queries that I've written return an error message that indicate
hql is trying to compare a bytea with an int.

The java method that I'm using has two input parameter: lowValue and highValue, both of type BigDecimal.

<snippet>

String queryString = " select galaxy as galaxy where galaxy.size between "
+ lowvalue + " and " + highValue;

Query query = session.createQuery (queryString);
resultList = query.list()

</snippet>


Thanks for any suggestions.

Charlie


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.