-->
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.  [ 3 posts ] 
Author Message
 Post subject: Named parameters with a session.delete()?
PostPosted: Tue Aug 26, 2003 5:06 pm 
Beginner
Beginner

Joined: Tue Aug 26, 2003 4:19 pm
Posts: 42
With a List of PKs (Integers), I'd like to delete a bunch of records without loading them into the session.

session.delete("from Result result where result.id in (:ids)", resultids, Hibernate.INTEGER);
gives me a ClassCastException

Query q = session.createQuery("from Result result where result.id in (:ids)");
q.setParameterList("ids", resultids, Hibernate.INTEGER);
session.delete(q.getQueryString());
tells me the parameter isn't specified.

What am I doing wrong?

Thanks for any tips:)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 26, 2003 5:16 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Hibernate does not currently (ever?) support mass updates or deletes. We have discussed many times the problems with this.


Top
 Profile  
 
 Post subject: Re: Named parameters with a session.delete()?
PostPosted: Wed Oct 13, 2010 5:34 am 
Newbie

Joined: Wed Oct 13, 2010 5:25 am
Posts: 10
I spent my whole life trying not to be careless. Women and children can be careless. But not men.

_________________
cheap watches
replica watches uk
replica watches


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