[teiid-issues] [JBoss JIRA] (TEIID-4397) Allow $it to be used in expand

Steven Hawkins (JIRA) issues at jboss.org
Mon Nov 27 12:53:00 EST 2017


    [ https://issues.jboss.org/browse/TEIID-4397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13494310#comment-13494310 ] 

Steven Hawkins edited comment on TEIID-4397 at 11/27/17 12:52 PM:
------------------------------------------------------------------

> 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.

Employee_FK0 is the reverse navigation, FK0 is the forward navigation.

Employee?$expand=Employee_FK0($filter=$it/name%20eq%20%27president%27) should mean navigating from the pk.  The expected result would expand all employees of an employee who has a name of president.  This is functioning as expected.

Employee?$expand=FK0($filter=$it/name%20eq%20%27president%27) should mean navigating from the fk.  The expected result would expand the manager of employees who have a name of president.  This later case is not working correctly.



was (Author: shawkins):
> 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.

Employee_FK0 is the reverse navigation, FK0 is the forward navigation.

Employee?$expand=Employee_FK0 should mean navigating from the pk - so the iterator would reference the employees.

The expected result would expand all employees who have an employee with the name president.  

Employee?$expand=FK0 should mean navigating from the fk - so the iterator would reference the manager.

The expected result would expand all employees who have a manager with the name president.

I don't think either of these are working as expected for a self relationship.


> 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)


More information about the teiid-issues mailing list