cancel
Showing results for 
Search instead for 
Did you mean: 

Apache Olingo JPA OData Provider, auto_incremented key and model update

HJA
Explorer
0 Kudos

Hello together,

for testing purposes i am using a MariaDB together with Apache Olingo JPA OData Services.

Out of a SAPUI5 Applikation i can successfully create records in the DB-tables where after the insert the auto_incremented key field 'ID' is actualized.

But it seems, that i miss something because the following GET of the odata model doesn't response the new value of the ID field (value is set as 0).

The other field values are correct reflected in the UI.

When i restart the Java Web Server the value of the ID field is also correct and displayed in the table control.

So, it must have something to do with the persistence layer and his commits.

Are there any People out who made the same experiences ?

Thanks a lot for your help.

Accepted Solutions (1)

Accepted Solutions (1)

HJA
Explorer
0 Kudos

Okay, find the mistake in the Annotation of the ID field inside the entity class.

No @GeneratedValue annotation necessary.

Regards

Answers (0)