my dog learned polymorphism*
The moose likes Object Relational Mapping and the fly likes Sending list of records to Named Query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Sending list of records to Named Query" Watch "Sending list of records to Named Query" New topic

Sending list of records to Named Query

Mohammed Yousuff
Ranch Hand

Joined: Oct 17, 2007
Posts: 198
I am using named query, to update a list of trasactions.

<sql-query name="updateErrors">

i want to send a list of txn ids to ALL_TRANSACTIONEVENT_ID column, may i know how can i send a list of records to named query???

thanks a lot

My Thoughts :
Try not to become a man of success but rather to become a man of value.
Javid Jamae
Ranch Hand

Joined: May 14, 2008
Posts: 198
Off the top of my head, I think your where clause needs to be:


then you need to use the setParameterList method. For example:

session.getNamedQuery("updateErrors").setParameterList( ... )

Author: JBoss in Action,, @javidjamae on Twitter
I agree. Here's the link:
subject: Sending list of records to Named Query
Similar Threads
my servlet can't initialize: null
native SQL update in Hibernate
Problem with Oracle CONNECT BY
Named query result mapping error
listing hibernate named queries from java