[teiid-issues] [JBoss JIRA] (TEIID-4064) OData - missing non-nullable property

Ramesh Reddy (JIRA) issues at jboss.org
Tue Mar 15 08:46:00 EDT 2016


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

Ramesh Reddy commented on TEIID-4064:
-------------------------------------

[~jdurani] The serializers are strict in checking if the property that is marked as non-null and null values are provided. I am not sure there is much we can do.

> OData - missing non-nullable property
> -------------------------------------
>
>                 Key: TEIID-4064
>                 URL: https://issues.jboss.org/browse/TEIID-4064
>             Project: Teiid
>          Issue Type: Sub-task
>          Components: OData
>            Reporter: Juraj Duráni
>            Assignee: Ramesh Reddy
>
> Change DDL for tables Customer and Orders in VDB as follows:
> {code:sql}
> CREATE FOREIGN TABLE Customers (
>   id integer PRIMARY KEY OPTIONS (NAMEINSOURCE 'id'),
>   name varchar(10)) OPTIONS (NAMEINSOURCE 'DB.PUBLIC.CUSTOMERS');
> CREATE FOREIGN TABLE Orders (
>   id integer PRIMARY KEY OPTIONS (NAMEINSOURCE 'id'),
>   customerid integer,
>   place varchar(10),
>   FOREIGN KEY (customerid) REFERENCES Customers(id)) OPTIONS (NAMEINSOURCE 'DB.PUBLIC.ORDERS');
> {code}
> Note, that both tables have same name of primary key named "id".
> Invoke GET method to URL http://localhost:8080/odata4/olingo_basic/Source/Customers/?$count=true&$expand=Orders_FK0
> *Result:*
> {code:xml}
> <error>
>   <code>400</code>
>   <message>The non-nullable property 'id' is missing.</message>
> </error>
> {code}
> Here are selected part of Teiid's log:
> *Query:*
> {code:sql}
> SELECT g10.id, g10.name, g11.id, g11.customerid, g11.place FROM Source.Customers AS g10 LEFT OUTER JOIN Source.Orders AS g11 ON g10.id = g11.customerid ORDER BY g10.id
> {code}
> *Result:*
> |id|name|id|customerid|place|
> |1|customer1|1|1|town|
> |1|customer1|2|1|state|
> |1|customer1|3|1|country|
> |1|customer1|4|1|abroad|
> |2|customer2|5|2|state|
> |2|customer2|6|2|country|
> |3|customer3|7|3|town|
> |3|customer3|8|3|town|
> |4|customer4|<null>|<null>|<null>|



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



More information about the teiid-issues mailing list