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?

Product version: IRIS 2020.3
$ZV: IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2020.3 (Build 221U) Thu Oct 1 2020 11:24:59 EDT
0 170
Discussion (1)2
Log in or sign up to continue

Do you still expect some echo?
Or is the question meanwhile just out of date?