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
128 stars 79 forks source link

Can enable upsert? #285

Open ghost opened 7 months ago

ghost commented 7 months ago

enable upsert for PATCH and PUT request?

wog48 commented 7 months ago

Actually, the JPA Processor it self does not handle Create, Update, Delete or Upsert requests. The provided JPAExampleCUDRequestHandler shall support rapide prototyping and is not foreseen for productive usage. In case you are in a hurry, copy the class and adopt implementation of updateEntity accordingly.

ghost commented 7 months ago

Changing updateEntity is what I am doing. While according to OData protocol: https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_UpsertanEntity, upsert is defined. So it will be better if it can be supported originally from this JPAExampleCUDRequestHandler?

wog48 commented 7 months ago

I agree, it would better. Therefore I marked this as enhancement. Nevertheless, I like to point out, that JPAExampleCUDRequestHandler is just for prototyping.