[teiid-issues] [JBoss JIRA] (TEIID-4044) OData ignores entities with empty list of related entities if $filter is applied to expanded entities

Ramesh Reddy (JIRA) issues at jboss.org
Mon May 23 17:05:00 EDT 2016


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

Ramesh Reddy commented on TEIID-4044:
-------------------------------------

(02:32:21 PM) rareddy: shawkins: can suggest how I can rewrite the query
(02:32:52 PM) rareddy: shawkins: it is like "SELECT g0.id, g0.name, g1.id, g1.customerid, g1.place FROM m.Customers AS g0 "
(02:32:52 PM) rareddy:                     + "LEFT OUTER JOIN m.Orders AS g1 ON g0.id = g1.customerid "
(02:32:52 PM) rareddy:                     + "WHERE g1.place = 'town' ORDER BY g0.id"
(02:34:18 PM) shawkins: rareddy: oh sorry, I was saying that wrong - yes this effectively degrades into an inner join.  the predicate would need to be part of the on clause instead

> OData ignores entities with empty list of related entities if $filter is applied to expanded entities
> -----------------------------------------------------------------------------------------------------
>
>                 Key: TEIID-4044
>                 URL: https://issues.jboss.org/browse/TEIID-4044
>             Project: Teiid
>          Issue Type: Sub-task
>          Components: OData
>            Reporter: Juraj Duráni
>            Assignee: Ramesh Reddy
>
> If user want to apply filter for related entities, OData service should return all entities, not only those with non-empty collection of related entities.
> *Example:*
> *URL:* http://localhost:8080/odata4/olingo_basic/Source/Customers/?$expand=Orders_FK0($filter=place%20eq%20%27town%27)
> *Result:* OData returns only 2 customers (both have at least one order with place "town")
> *Expectation:* OData should return all 4 customers (two of them should have empty list of orders)



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)



More information about the teiid-issues mailing list