on ‎2021 Jan 04 6:30 PM
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
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.