Bug 1468038 - OData v4 with $expand returns Fk not found
Summary: OData v4 with $expand returns Fk not found
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: Teiid
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Van Halbert
QA Contact: Jan Stastny
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-05 20:15 UTC by Cojan van Ballegooijen
Modified: 2017-08-15 16:26 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
I wonder how much we're goin
Last Closed: 2017-08-15 16:26:54 UTC
Type: Bug
Embargoed:


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

Description Cojan van Ballegooijen 2017-07-05 20:15:42 UTC
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 13:46:06 UTC
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.