-
Notifications
You must be signed in to change notification settings - Fork 356
IllegalArgumentException: The root aggregate cannot be updated because the version property is null #1254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please provide a Minimimal Reproducable Example, preferable as a Github repository. Make sure to include the database, either as an in memory database or if that is not possible using Testcontainers. The sample you currently provide contains lots of stuff that presumably has nothing to do with the problem at hand. |
These sample projects are very simple, the best way is forking my project and run it on local machine yourself. Or if you know well about the |
When saving an Aggregate which is not new, but has a null version attribute we now throw a DbActionExecutionException, like we used to. Closes #1254
When saving an Aggregate which is not new, but has a null version attribute we now throw a DbActionExecutionException, like we used to. Closes #1254
The complete example codes is here, https://github.com/hantsy/spring6-sandbox/blob/master/data-jdbc
There is a entity class implements
Persistable
and use theisNew
to identify if it is a new entity.When I set a id and
isNew
returns true, thus callingtemplate.save
will try to update the entity that is not existed, and throw aDbActionExecutionException
.These codes work well in the last milestone, when upgrading the latest milestone aligned with Spring 6.0.0-M4. The test failed.
The text was updated successfully, but these errors were encountered: