Java XPath Query: How do I retrieve all orderlines related to an order

3
I guess a very basic java xpath question: Suppose a domainmodel in which there is an order, orderlines that reference the order and suborderlines that inherit from orderlines. I want to retrieve all suborderlines related to a specific order. What should the XPath query that I use in retrieveXPathQuery look like?
asked
1 answers
3

The query you want to construct will probably resemble the following,

//Module.SubOrderLines[Module.Order_SubOrderLines='ID_12345']
  • The 'Module' string is the name of the module these entities are in.
  • The 'SubOrderLines' and 'Order_SubOrderLines' are strings you can find the the domain model
  • The 'ID_12345' string is the GUID of the Order the SubOrderLines are associated with

The XPath basically reads as 'all SubOrderLines where the associated Order is ID_12345'.

answered