-
Notifications
You must be signed in to change notification settings - Fork 682
Support domain events for deletions [DATACMNS-1663] #2084
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
Oliver Drotbohm commented That's merged for 2020.0.0 |
hey guys I noticed |
How would a |
Wouldn't @PrePersist/PreRemove etc potentially trigger the creation of some events which should be published? |
That's a good point. I'll have to investigate, but from a quick glance, I think that only JPA currently supports entity-attached lifecycle callbacks. This means, that while adding |
I've investigated the support for |
That is understandable. I think it would be a nice to have but not a must have. We only ran into this recently and switching to using the normal |
I guess we can still add a bit of clarification in the reference documentation. |
Oliver Behncke opened DATACMNS-1663 and commented
When saving an entity in a
CrudRepository
, the events available in the method annotated with@DomainEvents
are published.However, when deleting an entity with the same repository, none of the events are published. Explicitly, in
EventPublishingMethodInterceptor#invoke
only methods starting with "save" are considered to trigger publishing of the events.It would be nice, if the domain events would be published on delete, to avoid injecting the spring framework class
ApplicationEventPublisher
into the domain related codeAffects: 2.2.4 (Moore SR4)
Referenced from: pull request #436
8 votes, 5 watchers
The text was updated successfully, but these errors were encountered: