EJB programming & troubleshooting: finder with Collection/array of ids in Entity EJB (CMP)
- Posted by: Unic Man
- Posted on: May 07 2004 09:22 EDT
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.
- finder with Collection/array of ids in Entity EJB (CMP) by Collin VanDyck on May 07 2004 10:02 EDT
- finder with Collection/array of ids in Entity EJB (CMP) by Unic Man on May 07 2004 12:07 EDT
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.
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?