-->
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.  [ 4 posts ] 
Author Message
 Post subject: Cannot bind Bigdecimal data type in update query
PostPosted: Mon Sep 14, 2009 2:41 pm 
Newbie

Joined: Mon Sep 14, 2009 2:22 pm
Posts: 5
Hi,

I have a class XX(maps to table X), which has variables amount of type big_decimal and date of type date. When I am trying to update the class XX using following query

Code:
update XX y set y.amount = y.amount +:someAmount
where y.date >= :someDate


where someAmount is user passed amount which is of type big decimal.

I am getting error saying all named parameters are not set [someAmount]

If I convert the someAmount variable to string and bind that, then the query is successfully executed.

Could you please suggest where am I going wrong or Is it a hibernate problem that it can't bind big decimal values

I hope I provided all the required details, If not please let me know

Any sort of help is appreciated.

Thanks,
Shruthi


Top
 Profile  
 
 Post subject: Re: Cannot bind Bigdecimal data type in update query
PostPosted: Thu Feb 18, 2010 5:39 pm 
Newbie

Joined: Mon Sep 14, 2009 2:22 pm
Posts: 5
Can anyone please post reply for this question. I did my work around and I have no problem. But I want to know why update doesn't work for bigdecimals.

Thanks


Top
 Profile  
 
 Post subject: Re: Cannot bind Bigdecimal data type in update query
PostPosted: Thu Feb 18, 2010 6:22 pm 
Beginner
Beginner

Joined: Wed Nov 21, 2007 8:02 am
Posts: 48
your query worked without any errors.

How do you create query and how are you binding them?


Top
 Profile  
 
 Post subject: Re: Cannot bind Bigdecimal data type in update query
PostPosted: Thu Feb 18, 2010 6:52 pm 
Newbie

Joined: Mon Sep 14, 2009 2:22 pm
Posts: 5
Thanks for the response. If you could see my first message in the post, you would get all the details pertaining to my problem. If you still feel anything missing. Please let me know.


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