on 01-01-2014 9:07 AM
- I am currently want to develop POC on UI5 application with OData from ASE 15.7 developer edition instead of SAP Netweaver Gateway.
- It is easy to configure ASE with OData on laptop (Win 7) and UI5 app. development for POC.
I discovered this issue, fields which have Foreign Key relationship is not included in metadata and as well output data (atom/xml or json)
Database "odata" and table 'SalesOrders' which is taken from "dotnet" example (\Sybase\ODATA-16_0\samples\dotnet\init.sql)
Column_name | Type | Length | Foreign Key |
ID | int | 4 | |
CustomerID | int | 4 | Employees.EmployeeID |
OrderDate | date | 4 | |
FinancialCode | char | 2 | FinancialCodes.Code |
Region | char | 7 | |
SalesRepresentative | int | 4 | Customers.ID |
Starting OData service for database "odata"
cd %sybase%\ODATA-16_0\samples\dotnet
..\..\bin64\dbosrv16 DotNetConfig.properties
http://localhost:8090/odata/$metadata
<EntityType Name="SalesOrders">
</Key>
<Property Name="ID" Type="Edm.Int32" Nullable="false"/>
<Property Name="OrderDate" Type="Edm.DateTime" Nullable="false" Precision="0"/>
<Property Name="Region" Type="Edm.String" Nullable="true" MaxLength="7" Collation="utf8"/>
<NavigationProperty Name="FK_CustomerID_ID" Relationship="SAPSybaseOData.SalesOrders_Customers_FK_CustomerID_ID" FromRole="SalesOrders_Customers_Source" ToRole="SalesOrders_Customers_Target"/>
<NavigationProperty Name="FK_FinancialCode_Code" Relationship="SAPSybaseOData.SalesOrders_FinancialCodes_FK_FinancialCode_Code" FromRole="SalesOrders_FinancialCodes_Source" ToRole="SalesOrders_FinancialCodes_Target"/>
<NavigationProperty Name="FK_SalesRepresentative_EmployeeID" Relationship="SAPSybaseOData.SalesOrders_Employees_FK_SalesRepresentative_EmployeeID" FromRole="SalesOrders_Employees_Source" ToRole="SalesOrders_Employees_Target"/>
<NavigationProperty Name="SalesOrderItems" Relationship="SAPSybaseOData.SalesOrders_SalesOrderItems_SalesOrderItems" FromRole="SalesOrders_SalesOrderItems_Source" ToRole="SalesOrders_SalesOrderItems_Target"/>
</EntityType>
Fetching SalesOrders data from OData endpoint, fields which have Foreign Key relationship not coming
http://localhost:8090/odata/SalesOrders?$format=json
{
"d" : {
"results" : [
{
"__metadata" : {
"uri" : "http://localhost:8090/odata/SalesOrders(2001)", "type" : "SAPSybaseOData.SalesOrders"
}, "ID" : 2001, "OrderDate" : "\/Date(953145000000)\/", "Region" : "Eastern", "FK_CustomerID_ID" : {
"__deferred" : {
"uri" : "http
Hi,
You might want to open an incident with SAP tech support.
Cheers,
-Paul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am one of the developers on the team. This behavior is intentional and not a bug in the first release of odata producer. Please contact me directly if you have further questions.
Thanks
Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Mahesh,
Thanks for your reply.
I have a transaction table, in which I need to update some Foreign Key fields. But these fields not available in OData metadata nor in data. I could not able to proceed further.
But SAP Netweaver Gateway I am not facing like this issue.
Please enable this feature in ASE 15.7 OData Producer and it will enable many to proceed towards POC development in nice ASE 15.7 database.
User | Count |
---|---|
82 | |
11 | |
10 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.