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 repository.save(entity)
.
I have done some testing and created a Github repo with it...
https://github.com/jesjobom/iris-hibernate-key-test
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