Bug 1468038 - OData v4 with $expand returns Fk not found
OData v4 with $expand returns Fk not found
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: Teiid (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Van Halbert
Jan Stastny
Depends On:
  Show dependency treegraph
Reported: 2017-07-05 16:15 EDT by Cojan van Ballegooijen
Modified: 2017-08-15 12:26 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
I wonder how much we're goin
Last Closed: 2017-08-15 12:26:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
All_Customers OData4 metadata (3.14 KB, application/xml)
2017-07-05 16:15 EDT, Cojan van Ballegooijen
no flags Details

  None (edit)
Description Cojan van Ballegooijen 2017-07-05 16:15:42 EDT
Created attachment 1294735 [details]
All_Customers OData4 metadata

Description of problem:
Unable to use $expand using OData v4

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Setup Financials VDB (https://github.com/DataVirtualizationByExample/DVWorkshop)
2. http://localhost:8080/odata4/Financials/All_Customers/ACCOUNT(19980002)?$expand=CONSTRAINT_E4&$format=json

Actual results:
"error": {
"code": null,
"message": "Fk not found"

3. Using OData v2 URL http://localhost:8080/odata/Financials/All_Customers.ACCOUNT(19980002)?$expand=All_Customers.CUSTOMER&$format=json

Actual results

"d": {
"__metadata": {
"uri": "http://localhost:8080/odata/Financials/All_Customers.ACCOUNT(19980002L)",
"type": "All_Customers.ACCOUNT"
"ACCOUNTID": "19980002",
"ACCOUNTTYPE": "Personal",
"DATEOPENED": "/Date(886291200000)/",
"__metadata": {
"uri": "http://localhost:8080/odata/Financials/All_Customers.CUSTOMER('CST01002')",
"type": "All_Customers.CUSTOMER"
"FIRSTNAME": "Joseph",
"LASTNAME": "Smith",
"STREETADDRESS": "1234 Main Street",
"STREETADDRESS2": "Apartment 56",
"CITY": "New York",
"POSTALCODE": "10174",
"PHONENUMBER": "(646)555-1776"
"__deferred": {
"uri": "http://localhost:8080/odata/Financials/All_Customers.ACCOUNT(19980002L)/ACCOUNTHOLDINGS"

Expected results:
Similar to OData v2 results

Additional info:
Comment 2 Cojan van Ballegooijen 2017-07-10 09:46:06 EDT
I have tested the URLs with Teiid 9.3 using the same VDB and worked as expected.

Note You need to log in before you can comment on or make changes to this bug.