Bug 1468038 - OData v4 with $expand returns Fk not found
OData v4 with $expand returns Fk not found
Status: CLOSED NEXTRELEASE
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: Teiid (Show other bugs)
6.3.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Van Halbert
Jan Stastny
:
Depends On:
Blocks:
  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:
Environment:
I wonder how much we're goin
Last Closed: 2017-08-15 12:26:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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):
6.3.5

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",
"CUSTOMERID": "CST01002",
"ACCOUNTTYPE": "Personal",
"ACCOUNTSTATUS": "Active",
"DATEOPENED": "/Date(886291200000)/",
"DATECLOSED": null,
"CUSTOMER": {
"__metadata": {
"uri": "http://localhost:8080/odata/Financials/All_Customers.CUSTOMER('CST01002')",
"type": "All_Customers.CUSTOMER"
},
"CUSTOMERID": "CST01002",
"FIRSTNAME": "Joseph",
"LASTNAME": "Smith",
"MIDDLENAME": null,
"STREETADDRESS": "1234 Main Street",
"STREETADDRESS2": "Apartment 56",
"CITY": "New York",
"STATEPROVINCE": "New York",
"POSTALCODE": "10174",
"COUNTRY": "USA",
"PHONENUMBER": "(646)555-1776"
},
"ACCOUNTHOLDINGS": {
"__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.