[
https://issues.jboss.org/browse/TEIID-4397?page=com.atlassian.jira.plugin...
]
Steven Hawkins commented on TEIID-4397:
---------------------------------------
What are the semantics for using $it?
See
http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part2-ur...
section 5.1.1.11.4
{quote}
Example 84: customers along with their orders that shipped to the same city as the
customer's address. The nested filter expression is evaluated in the context of
Orders; $it allows referring to values in the outer context of Customers.
http://host/service/Customers?
$expand=Orders($filter=$it/Address/City eq ShipTo/City)
{quote}
Is this what is expected?
I don't think so. It should apply to the expanded entity, not the parent. I know
there were several issues with self relationships and predicates. I'll double check
this behavior in the upstream.
Either way I wasn't able to find this in docs. Generally speaking
the docs on OData topic are not very helpful as far as supported functionality is
concerned.
For the most part we rely on users consulting the spec
-http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part2-url-conventions.html Any
deviation from that or unsupported features should be documented.
Second question, is this applicable to $expand=* usage?
You would generally use expand * when there is more than one navigation property so that
everything can be expanded.
Allow $it to be used in expand
------------------------------
Key: TEIID-4397
URL:
https://issues.jboss.org/browse/TEIID-4397
Project: Teiid
Issue Type: Sub-task
Components: OData
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 9.1, 8.12.x-6.4
It should be possible to use $it in expand for correlated references.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)