This will be easier to see with a simple example - attached.
So I have a fairly simple structure - an invoice header, with a composition of lines. And a payment header, with its composition of payment lines. Each payment line has an association to an invoice line. And the invoice line entity in turn has a composition list of said payment lines. I want to sort that list by payment.dateReceived - a field of the parent of the payment line.
At runtime, this crashes with an Invalid query key exception.
How can I have that payment line list sorted by the dateReceived field of their parent Payment?
(The Designer even suggests this should work by showing order.date as a possible option in the “order by” box…)
orderbytesting.zip (88.4 KB)