[jboss-jira] [JBoss JIRA] (WFLY-10730) Scan for entities in persistence root when using unmanaged JPA persistence unit
Stephen Fikes (JIRA)
issues at jboss.org
Mon Jul 23 12:26:00 EDT 2018
Stephen Fikes created WFLY-10730:
------------------------------------
Summary: 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-eval-spec/JavaPersistence.pdf#G4.1474790], 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.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list