Get the persistence-unit name [duplicate]

我与影子孤独终老i 提交于 2019-12-11 10:17:25

问题


How do you get the name of a persistence-unit in Java? I have a persistence.xml with many units, so I want to control which unit is used to create my EntityManager.

There's method like getPersistenceName or smth? I have searched for a while but did not find anything useful.


回答1:


Please check this thread: Finding the current persistence unit for the current EntityManagerFactory



来源:https://stackoverflow.com/questions/5393167/get-the-persistence-unit-name

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!