SAP / olingo-jpa-processor-v4

The JPA Processor fills the gap between Olingo V4 and the database, by providing a mapping between JPA metadata and OData metadata, generating queries and supporting the entity manipulations.
Apache License 2.0
127 stars 79 forks source link

Does olingo-jpa-processor-v4 supports “deep update” functionality? #82

Closed taj499 closed 5 years ago

taj499 commented 5 years ago

Does olingo-jpa-processor-v4 supports “deep update functionality? payload of the update can contain nested entities for creating new or updating existing related entities.

I can see example “deep insert” only. If it supports “deep update” then please provide me example to implement it.

wog48 commented 5 years ago

Deep Update is a 4.01 functionality (New: Deep Update). Up to now only 4.00 is supported by the JPA Processor.

taj499 commented 5 years ago

Thanks for reply. Could you please let me know when do I expect it (“Deep Update”) in olingo-jpa-processor-v4 API?

wog48 commented 5 years ago

I just played around and found out that, even so Deep Update is a 4.01 functionality, you can use it already. As of now you have to send it as 4.00 request. The data are provided in the same way as they are provided for Deep Insert. You have to implement the you implementation of JPACUDRequestHandler accordingly. Unfortunately the response is not correct.

In case you followed the tutorial you can take the payload of the deep insert request and e.g. create a PATCH request with the following url .../AdministrativeDivisions(DivisionCode='DE5',CodeID='NUTS1',CodePublisher='Eurostat')

wog48 commented 5 years ago

I hope this helped. In case you have another question please open a new issue.