PERSISTENCE UNIT (PERSISTENCE.XML)
已回答
I want to create persistence.xml file like following picture, how to solve this problem in intellij?
请先登录再写评论。
Please see https://www.jetbrains.com/help/idea/persistence-tool-window.html#create-entities.
Is this really what I'm looking for? I don't fully believe it. Basically, I want to convert my created entities directly to a table via jpa.
Serge Baranov ?
You can't do it with IntelliJ IDEA, only the other way around.
Serge Baranov Then can you tell me how can I convert the entity I created to the table in the database via jpa?
Serge Baranov??
Really intellij didn't make most things possible. I don't understand why this makes things so difficult.
You can't do it with IntelliJ IDEA.
Serge Baranov are you kidding me? This is a general rule, how can we not? So I can't convert my entity class that I created one into a database table?
The feature you are looking for doesn't exist in IntelliJ IDEA. It can generate persistence mapping from the database schema, but not vice versa, see https://www.jetbrains.com/help/idea/persistence-tool-window.html#generate_entities_and_mappings .
Serge Baranov So is there any plugin for this that I can download?
We are not aware of such plug-ins.
There is such a plug-in. It's called JPA Buddy. The feature you're describing is only in the paid version of the plug-in. Here's how to use it: