-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
SoftDelete entities are hard deleted on orphan removal #2948
Comments
Ok, on second look, I had an old forked version of the repository, sorry for the confusion. I cannot get maven to import the project to the newest version. I'll look at it later. |
To clear up the confusion - this bug happens on version 13.11.2, the current repo version of 13.11.3-SNAPSHOT couldn't be imported by maven. Could you please have a look at the reported bug? |
This could be related to #2952 |
So in version 11.22.9 Issue #1505 added the code ...de9823b#diff-b252eeaf218f406dfa45c3497ea358735b864214080d3ff07bccc72bd68f2cccR906 ... and that true flag there on that delete() method means delete permanent. Turning that to false makes it a "normal delete" which is then changed to a soft delete if the entity in question has soft delete support. That is, we have had this bug since 11.22.9 when that code was introduce rather than this being a regression. |
Expected behavior
Statefully replacing field that is
@OneToOne(cascade = CascadeType.ALL, orphanRemoval = true)
should result in the old value having the soft delete column updated to true.Actual behavior
The old value is hard deleted (
delete from
)Steps to reproduce
Please see attached unit test. The unit test repository is running ebean version 13.6.5 (for newer versions there are some breaking changes), but this bug is happening in our application on the version 13.11.1.
The text was updated successfully, but these errors were encountered: