-->
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: type casting error
PostPosted: Fri Aug 24, 2007 1:12 pm 
Newbie

Joined: Mon Aug 20, 2007 5:18 am
Posts: 8
how can I change Interger type, which is declared in the hibernate mapping, to String type.

My program send integer values, and they are initialized to String.
How every HQL gives error message: Type Casting

This is my code

Query query = session
.createQuery("delete from Post p where p.id IN(:ids)");
query.setParameter("ids", ids);
query.executeUpdate();


ids : type String

such as ids="1,2"


p.id: type Integer and declared in the map


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.