finder with Collection/array of ids in Entity EJB (CMP)

Discussions

EJB programming & troubleshooting: finder with Collection/array of ids in Entity EJB (CMP)

  1. Hi!

    Is is possible to write EJBQL where I will send Collection of entity-ids as parameter to a finder method?

    Basically I want to filter entities with the help of different ejbSelect methods. Once I have final set of ids, I want to get details of such entities.

    Your help will be most helpful to me.

    Thanx in advance.
  2. Not that I know of. A discussion started on JBoss.org about how to do this very thing using an array, and the conclusion was that it was not possible.

    Your code will most likely have to iterate over your collection,querying for each individual PK.
  3. Well... I was also wondering that there is same and the only solution here...

    But that will be little costly... firing PK for every id. What is your opinion?