The collection of metamodel types is empty
I'm have a maven project with JPA and EclipseLink. When I run it don't generate the tables in the database. I have this output:
IceCreamShop/src/main/resources/META-INF/persistence.xml:
16 Replies
⌛
This post has been reserved for your question.
Hey @Franscis123$#! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
All of my classes have a similar mapping:
pom.xml:
Adding to persistence.xml don't solve it, neither with true
Can you show your main class?
or whatever creates the
EntityManagerFactory
What IDE are you using?according to https://www.eclipse.org/forums/index.php/t/365263/, the warning shouldn't matter if you don't use the criteria API
Eclipse Community Forums: EclipseLink » The collection of metamodel...
The Eclipse Foundation - home to a global community, the Eclipse IDE, Jakarta EE and over 350 open source projects, including runtimes, tools and frameworks.
What happens if you just try to insert an element into the DB from your application?
I think it might only create the tables when you execute something
or you could try these properties:
.
you create a new
EntityManagerFactory
for each entity class/controller?
normally you should have one EntityManagerFactory
for your application
e.g. you could create it in PersistenceController
I created a JpaController class for each class
yeah but you don't need to create
EntityManagerFactory
s in each of these controllersIntelliJ IDEA Community
.
.
.
I don't tried it because I don't have tables in my database
Also I used NetBeans only to generate the JpaControllers, because IntelliJ Community don't have these options with premium, and it generate one for each class.
try it and see what happens I guess
How could create the EntityManagerFactory in the Persistence Controller?
ping since it's been some time since you wrote that
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.