]
Scott Marlow resolved WFLY-10730.
---------------------------------
Resolution: Rejected
I don't think there is a WildFly bug to resolve here.
Scan for entities in persistence root when using unmanaged JPA
persistence unit
-------------------------------------------------------------------------------
Key: WFLY-10730
URL:
https://issues.jboss.org/browse/WFLY-10730
Project: WildFly
Issue Type: Enhancement
Components: JPA / Hibernate
Affects Versions: 13.0.0.Final
Reporter: Stephen Fikes
Assignee: Scott Marlow
Attachments: testcase.zip
Per the [JPA
specification|http://download.oracle.com/otn-pub/jcp/persistence-2_2-mrel...],
entities in the root should not need to be explicitly specified (they should be
automatically discovered). This works in a managed scenario (using injected entity
manager) but doesn't work in an un-managed case (entity manager factory / entity
manager created explicitly in application code) when using the same persistence unit.
Also attempted to work around the limitation by declaring an explicit scanner
({{hibernate.archive.scanner=org.jboss.as.jpa.hibernate5.HibernateArchiveScanner}}) but
this requires disabling managed JPA for the unit ({{jboss.as.jpa.managed=false}}) so a
single unit cannot be used in both managed and un-managed scenarios.