Open Zemke opened 6 years ago
While I have not tested it yet, it appears that you can simply inject the EntityManager
and then use new JpaMetamodelRedGProvider(entityManager.getMetamodel())
instead of the "traditional" approach using JpaMetamodelRedGProvider.fromPersistenceUnit("name-of-unit")
. I'm going to setup a test Spring project to confirm this the next few days, but according to multiple sources this should work just fine.
Spring Boot for instance doesn't use traditional persistence unit anymore.