-
Notifications
You must be signed in to change notification settings - Fork 41.2k
EntityManagerFactoryBuilder cannot be used as advertised #10068
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
It isn't that easy unfortunately. The It is weird to provide such service as a bean and then make it work on a totally unrelated Back to the doc, it is incomplete as it doesn't tell you how to obtain that My suggestion at this point would be to clarify the doc. Thoughts? |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
The reference documentation suggests to use
EntityManagerFactoryBuilder
to setupEntityManagerFactory
instances in case one has to configure multiple ones. Unfortunately, the code shown doesn't work as theEMFB
bean is created byJpaAutoConfiguration
which expects a singularDataSource
instance in the first place. Manually excluding that configuration then results in theEMFB
not being present and the invocation of the factory method failing.Maybe the auto-configuration for
EMFB
can be moved to a separate class that is not dependent on a singleDataSource
instance?Related tickets: #5542, #5541.
The text was updated successfully, but these errors were encountered: