Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6195991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:33:58+00:00 2026-05-24T03:33:58+00:00

I am building a report from information received from a muti-select form element in

  • 0

I am building a report from information received from a muti-select form element in a jsp page.

In my repository class I am getting an array of objects from that element. I need to call the getId function for each one of these objects and send those ids to the NamedQuery.

Here is a code example to help explain. I know how to handle a single object but with an array of objects I get lost at the .setParameter(1, employees[].getId()) part.

    public List<RequestByRequester> getFormInformation(
        Employee[] employees) 
        throws NoDataFoundException {

        List<RequestByRequester> resultList = getEm().createNamedQuery(
                "requestByRequestor.getRequestsByRequesters", RequestByRequester.class)
                .setParameter(1, employees[].getId())
                .getResultList();

        return resultList;
    }

By request the query:

    SELECT EMP.EMPL_FIRST_NAME || ' ' || EMP.EMPL_LAST_NAME REQUESTER,
           R.RQST_ID RQST_ID,
           R.TITLE TITLE,
           R.DESCRIPTION DESCR,
           DECODE(R.RESOLUTION_DATE, NULL, 'Open', 'Closed') STAT
   FROM TARTS.REQUESTS R, SYS_EMPLOYEES EMP
  WHERE R.EMPL_ID_REQUESTED_BY = EMP.EMPL_ID
    AND EMP.EMPL_ID IN (?)
  ORDER BY 1, 5 DESC, 2
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T03:34:00+00:00Added an answer on May 24, 2026 at 3:34 am

    I tried calling Madame Mystique to get help with finding out what your query actually was, but no luck, so I’m just going to go for it…

    Your named query should look something like this:

    select x
    from MyClass x
    where x.children.id in (:ids)
    

    then get your ids into a list

    List<Integer> ids = new ArrayList<Integer>();
    ids.add(someid);  // etc
    

    then use this to specify it in your query

    .setParameter("ids", ids)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form that collects information from several models that are several layers
I am building a report which gets data from a dataset containing 10 rows.
I am building a Report in MS Visual Studio which gets its data from
I'm building a report in Visual Studio 2008 with a lot of multivalue parameters
I'm currently building a MS Reporting Services Report that gets rendered to excel. I'm
Recently I needed to generate a huge HTML page containing a report with several
I’m building a application that monitors information on a website. The website allows you
I am building a data warehouse. I need to get data from different sources
I am building a report in Reporting Services 2005, where the data is retrieved
When building a report in Business Intelligence Studio 2008, I've noticed that the hide/show

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.