After upgrading from 5.4.16 to 5.4.17 we had several unit tests failing in one of our projects.
I did some investigation and came up with a minimum scenario and test case that reproduces the problem:
And a test case:
With 5.4.16 the following statements are executed and the test completes successfully
With 5.4.17 the result is
If the @NotNulll annotation is removed the entities are saved without any problem, only in a different order
It seems to be related with the fix provided by
H2 Database in MySQL mode was used for the test