cancel
Showing results for 
Search instead for 
Did you mean: 

Error while trying to update entry in cds view

Animatron
Explorer

I'm currently modifying the tutorial of Daniel Jung where we use CAP with a Hana Cloud Instance (here). In my modified version, I want to use 2 different cds entities which share 1 similar value and join these 2 entitys based on this value.

Out of these 2 different views I provide an odata service each, so I can access the data in my application.

In a third view I want to display the connection between these tables and let the user click the elements if the tool is still in their possession.

I need the connection between the tables to see which user has the tool right now and who is the responsible person for this tool.

The entities looks as follows:

Entity: Responsible_Tool

ID | Responsible-ID    | Responsible-Name           | Tool_ID 
123| MaxMu321;BerDo328 | Max Mustermann;Berta Dorte | Hammer123
134| BerFr172          | Bernd Fritz                | Broom567 

Entity: Tool_In_Use

ID | Tool_ID     | User          | Date 
738| Hammer123 | Max Mustermann | 25.03.2021 231| Broom567 | Bernd Fritz | 02.12.2021

To connect these to tables, I have created a cds view with a join on both view where Respo.Tool_ID = Tool.Tool_ID.

The view work fine when I display the data, but I cannot update the joined view when the user gives his feedback in the application.

When I try to update the cds view I get the error:

Error: UPDATE on views with join and/or union is not supported

Which makes sense because I have read that the cds view only supports viewing the data.

Therefore I have tried to make the connection via the odata service with different select + where statements. But here I also get the same error.

Now I am kind of lost because I cannot find another solution to connect these 2 entitys and later update the connection based on user input.

Does anyone know how I can make this work?

Thanks in advance!

Accepted Solutions (0)

Answers (0)