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

OData Draft Enabled error

gadirov
Participant
0 Likes
1,676

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

Accepted Solutions (1)

Accepted Solutions (1)

david_kunz2
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Rufat,

You need to use the SAP HANA database when you deploy your app. For this, you'll need to bind your app to an SAP HANA instance and set the kind of your db to `hana`, see https://cap.cloud.sap/docs/guides/databases for more information.

Best regards,
David

Answers (1)

Answers (1)

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...