-
Notifications
You must be signed in to change notification settings - Fork 307
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
entity: add new entity-listener tag #25
Conversation
We already have plan for this feature. However, it was not implemented because of one limitation of listeners (we can't use entity manager inside them). Still it can be useful for pure computation/validation. We'll consider it for next 5.1 or 5.2 release. BTW, would you please sign the CLA? |
Hi, |
Would you please rebase this patch on dev branch? We'll integrate it in 5.1 release. |
36c9e28
to
d82e00b
Compare
@axeloradmin Done :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the comments and make the changes accordingly.
axelor-gradle/src/main/groovy/com/axelor/tools/x2j/pojo/Annotation.groovy
Outdated
Show resolved
Hide resolved
axelor-gradle/src/main/groovy/com/axelor/tools/x2j/pojo/Annotation.groovy
Outdated
Show resolved
Hide resolved
axelor-gradle/src/main/groovy/com/axelor/tools/x2j/pojo/Entity.groovy
Outdated
Show resolved
Hide resolved
@axelor all requesdt changes have been taken into account |
d82e00b
to
4b169b6
Compare
Would you please make the required change |
Hi Can't see what you're talking about, for me all changes (including the Regards |
Change line 209 to |
Allow entities to declare listeners that'll be invoked during lifecycle. This allows to perform consistency checks in a more reliable way than overriding repository save() method as listeners are called even in case of cascading persist. Annotation has been modified to allow avoiding imports since for @EntityListeners we need to pass .class which doesn't play well with autoimport. Alternative would have been to import and append '.class' to annotation param by the mean of another boolean parameter.
4b169b6
to
2fcf184
Compare
Done |
The patch is cherry picked and amended with few changes. It's now included in dev branch. Thanks! |
Allow entities to declare listeners that'll be invoked during lifecycle.
This allows to perform consistency checks in a more reliable way than
overriding repository save() method as listeners are called even in case
of cascading persist.
Annotation has been modified to allow avoiding imports since for
@EntityListeners we need to pass .class which doesn't play well with
autoimport. Alternative would have been to import and append '.class' to
annotation param by the mean of another boolean parameter.