cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Read only

OData Draft Enabled error

gadirov
Participant
0 Likes
1,677

Dear SAP CAP Experts,

I am running into the following error when I set "odata.draft.enabled" for the service entity. It works fine when testing via fiori preview locally or via generated fiori elements app (also local). But as soon as I deploy the app to SCP I ran against an error ("Not connected to primary datasource!", ) which you can also see in the log screenshot below. Note: No external service is being consumed in this step, only my cds entities are being exposed as OData...

This is my main (renamed here) entity:

@odata.draft.enabled entity CarPark @(title : 'Car Park', //odata.draft.enabled : true ) as projection on data.CarPark { * , parkingSpot : redirected to ParkingSpots };
entity ParkingSpots @(title : 'Parking Spots') as projection on data.ParkingSports{ * , carPark: redirected to CarPark };

I am using "CUID" as key for the main entity.

Here is the log file after deployment to SCP CF:

Thank you for your support. I can provide more details if needed.

thomas.jung mariusobert dj.adams

BR

Rufat

View Entire Topic
gadirov
Participant
0 Likes

My assumption is that this error occurs because I didn“t bind a database (hana cloud) yet which should be necessary for drafts/creation of new instances...in memory testing is not possible after deployment or I must adapt the "requires db section" in package.json....I am going to create persistency in the next step...