Re: xDev API Java example for querying array of objects using find
Posted by: Filipe Silva
Date: April 11, 2022 04:02AM

Not clear to me what exactly you are trying to accomplish but this should work:

find(":ID IN employeedetails[*].empID").bind(ID, "123").execute();

However, this will return the entire document object and not just the "empID" & "empName" inner object. This is so because Collection.find() is built to find top-level documents, not document parts.

If what you are looking for is just the inner object, then you'll have to process the filtered result to extract the part you want.

IHTH

Options: ReplyQuote


Subject
Written By
Posted
Re: xDev API Java example for querying array of objects using find
April 11, 2022 04:02AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.