on 03-11-2020 10:34 AM
Hello,
When we use OData services exposed via CDS, a POST request on an entity creates a new row and also returns it as part of the response body. How can I have this newly created row of data when making use of cds apis insider the custom handlers?
My goal is to create a new row of data by using cds.transaction or INSERT.into() or similar APIs inside event handlers of a service definition. Currently, these apis return the number of affected rows for Insert, Delete and Update calls.
Thanks,
Ashish
How would I retrieve things with an additional SELECT if I only get the number of affected rows? How would I know what to select, if I don't get the affected IDs back from the call? Especially in the case of an INSERT where I don't have any clue about what has been created with which ID ...
How could that be "how database clients work"? How can anyone work with that?
me: "please create some entries with the following values"
db: "done that, created 5 entries"
me: "what are the keys you created for them so I can find them?"
db: *shrug*
...
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 | |
11 | |
10 | |
8 | |
6 | |
6 | |
6 | |
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.