on 01-05-2024 3:19 AM
Tutorials: https://developers.sap.com/tutorials/cp-apm-nodejs-create-service.html
--------------------------
Thank you, rene.jeglinsky, chuergo16 , daniel.wroblewski , joshua.margo, for this beautiful tutorial!
I got successful to step 7, and thought I had accomplished step 8 with the persistent database. However, the cds appears to not catch the persistent database. It keeps referring to the in-memory database when entering
C:\Users\<myuserId>\my-bookshop>cds watch:
Before that, the command
C:\Users\<myuserId>\my-bookshop>C:\sqlite\sqlite3 db/my-bookshop.db -cmd .dump
appeared to work out with this set of tables getting created:
etcetera...
...ending with a successful looking
Where did things go wrong?
Is this why the custom logic for ordering books won't work? I'm getting a response code 204 "No content" and the stock of "Wuthering Heights" remains at 12.
Thank you.
Hi Andreas,
it seems that with CAP 7 the command
cds deploy --to sqlite:db/my-bookshop.db
doesn't update the package.json anymore. So it seems you need to follow the documentation Custom Configuration and add this manually to your package.json:
"cds": {
"requires": {
"db": {
"kind": "sqlite",
"impl": "@cap-js/sqlite",
"credentials": {
"url": "db/my-bookshop.db"
}
}
}
}
Then try again after you've added the custom logic of step 10.
Best Regards
Gregor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
9 | |
9 | |
7 | |
7 | |
7 | |
7 | |
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.