Filipe Leandro opened SPR-12821 and commented
When using the PersistenceUnitPostProcessor interface for dynamically injecting Entities and Named Queries in my EntityManagerFactory, I use the method MutablePersistenceUnitInfo.addManagedPackage() to add a package for the EntityManagerFactory scan for entities.
However these packages never get scanned.
If I use the method MutablePersistenceUnitInfo.addManagedClassName() and manually add all the classes in thoses packages it works with no problem.
I'm I doing something wrong?
I have tried using these persistenceProviders with the same end result:
- org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider
- org.hibernate.jpa.HibernatePersistenceProvider
Affects: 4.1.5
Referenced from: commits 98d00ea, 4f1d9fd