Starting with version 3.0.0 save does not work correctly anymore , if a custom entity lookup strategy is configured.
If we have an EntityLookupConfiguration like
assuming some Document like
then any update operation fails with 409.
Actually, when the frameworks tries to save (updates the persistent data), the id of the persistence layer (id in our case) is substituted by the lookup key (uid), and then the save operation inserts a new document with a uid forbidden by the unique id.
The "bug" is in PersistentEntityResourceHandlerMethodArgumentResolver#resolveArgument (lines 139-150), where the persistence-id-property is set.
I'm not quite sure under with conditions the requiredIdProperty should be set;
perhaps only if (!forUpdate) or (!forUpdate && !noCustomLookupConfig) or something similar along the lines.
The result then may be something like:
This is actually equivalent to what was implemented in 2.x.x branches.
Note this does still not give a valid solution of the problem in the sense of the requirements in DATA-REST-1050 in case of EntityLookupConfiguration. This is because in case of creating a new resource, a lookup by the same custom key does not find the created resource in general.
But at least, it allows us to upgrade existing applications to Spring Boot 2.0, since we are not relying on an idempotent PUT anyway. With the current version, we see no way to upgrade to Spring Boot 2 at all.