Use a single persistence unit as both managed and unmanaged unit in JBoss EAP
Issue
- A persistence unit "MyUnit" is declared in a
persistence.xmlwithin<EAR>/lib/psunit.jar - Entities within the unit jar are auto-discovered for managed (e.g. injected) entity managers
-
References (e.g. in queries) to the bundled entities fail when using un-managed entity managers
org.hibernate.hql.internal.ast.QuerySyntaxException: Employee is not mapped [from Employee e]
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 7
- Hibernate 5
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.