Jairton Junior · Feb 11, 2021

Natural Key with Generated Field and Hibernate

Consider a Natural Key with an Identity (Serial) field.

I cannot seem to acquire the generated value after persisting my entity. That is, the returned entity by Spring Data's "save" does not have the generated value.

The value is generated by the database, and I can query it after

I have done some testing and created a Github repo with it...

Am I missing something?

$ZV: IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2020.3 (Build 221U) Thu Oct 1 2020 11:24:59 EDT
Product version:
IRIS 2020.3
2 0 0 43