I read a few threads on setting a one out of n persistence-unit in JPA as default. But the usage of hibernate.default_schema seems to be vague.
However, I want to achieve the following.
<persistence-unit name="myMainPU"> ... </persistence-unit><persistence-unit name="auxilliaryPU"> ... </persistence-unit>@Persistence(unitName="myMainPU") for the default persistence unit. Should be simply like this @Persistence.@Persistence(unitName="auxilliaryPU") How does one achive that? I use Hibernate 4+ and could also accept a proprietary solution.
Thanks.
There is no such default option of "default pu".
What you could do is to use CDI and decide which PU you will use. I cannot see other way of doing it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With