on 12-03-2020 10:42 AM
I created a services.js and services.cds with following content. There are no errors but de cds watch shows me that services.js is not implemented like in the tutorials and I am actually not sure about the problem...
Are you sure you cds and js file names match exactly. I see in your one screen shot that the Services.js has a capital S. Does your cds file also use a capital S? Even case matters when matching here. If that's not the situation, then please post a screenshot of your project structure. Also consider that you can configure the handler explicitly in the service cds file if you don't want the automatic name mapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No you can't write you exit handler in the cds file itself. But you can explicitly tell CAP where to find the handler. Example here: https://github.com/SAP-samples/hana-opensap-cloud-2020/blob/main/srv/service.cds#L23
What exactly does not work? I see you use latest @sap/cds 4 notation, do you have the right version also included in your package.json?
You read handler is appearing first of all "after" and not attached to any entity? What is your expected outcome or where do you want your json payload to be returned?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don’t understand what’s your objective for overriding your OData Entry Point for your service, where metadata is handled and all Entities, Entity Sets, Functions etc. are defined. Furthermore, you need to be aware if you want to override the read handler, to return the same structure like your cds Service has defined
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.