-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
HHH-19205 Do not recreate the validator on each BeanValidationEventListener#validate call #9806
base: main
Are you sure you want to change the base?
HHH-19205 Do not recreate the validator on each BeanValidationEventListener#validate call #9806
Conversation
Thanks for your pull request! This pull request appears to follow the contribution rules. › This message was automatically generated. |
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.
LGTM
Sounds reasonable. Or you could register a, um, what's it called? SessionFactoryObserver? |
…stener#validate call
7ae0202
to
b72591b
Compare
|
btw ... since it's in the |
Nooooooooo, these are definitely implementation details. The migration guide would be completely useless if it mentioned every single implementation change. Ideally, it should draw people's attention to things they actually need to pay attention to. |
Hey @gavinking , @beikov
Since you've been talking about the validator in the other PR 😄 it got me interested.
The fact that we recreate the validator on each validate call feels a bit redundant, so I've started looking into it. And this PR is where I got so far.
It would be nice if we wouldn't need to have that
traversableResolver.addPersisterIfNecessary( persister, sessionFactory );
I've added. But to get rid of it, we need to have access to the built SF (not the one being built that we can get our hands on right now from the integrator). Would it make sense to add someIntegrator#postintegrate(Sf sf... )
method that is called at the very end of the SF constructor, then eagerly build the association map?Or am I missing something here 😄
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.
https://hibernate.atlassian.net/browse/HHH-19205