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

Jan Stastny (JIRA) issues at jboss.org
Fri Nov 24 16:08:00 EST 2017


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

Jan Stastny edited comment on TEIID-4397 at 11/24/17 4:07 PM:
--------------------------------------------------------------

[~shawkins] What are the semantics for using $it?

Following example:
* Employee (employee_id, name, manager_id) is a entity with self-relation.
* I have
    | employee_id | name | manager_id |
    | 1 | 'president'| null |
    | 2 | 'vice-president'| 1 |
    | 3 | 'director'| 2 |
    | 4 | 'manager1'| 3 |
    | 5 | 'manager2'| 3 |
    | 6 | 'employee1'| 4 |
    | 7 | 'employee2'| 4 |
    | 8 | 'employee3'| 4 |
    | 9 | 'employee4'| 5 |
    | 10 | 'employee5'| 5 |
    | 11 | 'employee6'| 5 |
* now for query
    {code}http://localhost:8080/odata4/olingo_basic/Source/Employee?$expand=Employee_FK0($filter=$it/name%20eq%20%27president%27){code}
* the result is that only Employee 'president' is expanded
* Is this what is expected?

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.

Second question, is this applicable to $expand=* usage?


was (Author: jstastny):
[~shawkins] What are the semantics for using $it?

Following example:
* Employee (employee_id, name, manager_id) is a entity with self-relation.
* I have
    | employee_id | name | manager_id |
    | 1 | 'president'| null |
    | 2 | 'vice-president'| 1 |
    | 3 | 'director'| 2 |
    | 4 | 'manager1'| 3 |
    | 5 | 'manager2'| 3 |
    | 6 | 'employee1'| 4 |
    | 7 | 'employee2'| 4 |
    | 8 | 'employee3'| 4 |
    | 9 | 'employee4'| 5 |
    | 10 | 'employee5'| 5 |
    | 11 | 'employee6'| 5 |
* now for query
    {code}http://localhost:8080/odata4/olingo_basic/Source/Employee?$expand=Employee_FK0($filter=$it/name%20eq%20%27president%27){code}
* the result is that only Employee 'president' is expanded
* Is this what is expected?

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.

> 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