Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JPA meta-model analysis without persistence unit name #26

Open
Zemke opened this issue Nov 1, 2018 · 1 comment
Open

JPA meta-model analysis without persistence unit name #26

Zemke opened this issue Nov 1, 2018 · 1 comment

Comments

@Zemke
Copy link
Collaborator

Zemke commented Nov 1, 2018

Spring Boot for instance doesn't use traditional persistence unit anymore.

@olewehrmeyer
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants