-
Notifications
You must be signed in to change notification settings - Fork 40.2k
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
Support advanced customization of Hibernate settings #11211
Comments
@RizziCR extending an auto-configuration is a smell, please don't do that. Rather, it would have been nice to report the feature here so that we implement it properly. I'll give it some thoughts, thanks for reporting it! |
This was prompted by a short discussion on Twitter. It feels similar to what we did in M7 for the naming strategies. It feels like a more general purpose callback for customising the Hibernate properties may be in order here. We could, perhaps, revert the bean-based naming strategy support and document the use of the callback instead. |
I think the only change needed to support this use-case (and in general customization of vendor jpa properties for the EntityManagerFactory) is to make the |
@httpdigest I disagree. This class is internal and was made private for a very good reason. |
Alright then. You of course have more insight into the matter. All I'm saying is that people have a use-case which is not supported by Spring Boot right now and I was proposing a working workaround. |
I am not following. This issue is going to provide a first-class support for what you're trying to do as far as I understood #11357. If that does not, feel free to comment there. |
Works fine.. Thanks! |
Works how? I can not solve this with Spring Boot 2.0.0.RELEASE... |
The commit that closed this issue Includes an update to the documentation that describes how the new functionality works. If you need some help beyond that, please ask on Stack Overflow or Gitter. |
After upgrade from Spring Boot 2.0.0 M2 to 2.0.0 M6 my Hibernate interceptor implementation don't work anymore.
My old implementation:
But with M5 or M6 the HibernateJpaAutoConfiguration class changed and extends JpaBaseConfiguration no more.
I try to add my interceptor per YAML-Configuration file, but it's not working.
My Interceptor:
It's possible to add the interceptor as property "spring.jpa.properties.hibernate.session_factory.interceptor", but this is a hibernate instance and not accessible in the spring context.
It would be nice, if in future versions it's possible again, to use a spring controlled bean as hibernate interceptor, with auto configuration.
The text was updated successfully, but these errors were encountered: