Retrieve from Database using a list in xpath constraint

0
Hi, I have a scenario like, i am retrieving all loans from Database by putting almost 10 xpath constraints. I want to split this 10 constraints. So first I want to retrieve all loans based on 5 xpath constraints, let's say the output variable is LoanList. Again i want to filter the LoanList with rest 5 constraints. (I tried retrieving the loans again from DB, and tried to use the first filtered LoanList. But getting xpath error.) Can anyone help me out to achieve this? Thank you.
asked
1 answers
3

Soumya,

In order to do this, you could create a helper entity with an association to Loans (many to many).  After your first retrieve, create a new object with your helper entity and set the association to Loans with the list from your first retrieve.  Now you can perform a second retrieve using the helper entity (and its association to Loans) and the other Xpath constraints you want to use.

Hope that helps,

Mike

**edit**

That depends on what you are filtering on.  If you are filtering attributes on the Loans entity, you can do that with a List operation.  If it is associations, you cannot do that with a List operation.  A couple of additional notes:  

  • If your list is large, performing the search using the database is almost certain to have better performance than using List operations
  • In Mx7, you can filter Lists using a List operation over associations, however, I see that this app is in Mx 6

 

answered