This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Sending list of records to Named Query
It's not a secret anymore!