How can I generate entity (POJO) from database model using IntelliJ IDEA 10. I create "Data source" in IntelliJ but I have not any idea how can I generate the POJO.
Generate a database entityClick Code | Generate or press Alt+Insert . Select the entity that you want to generate and press Enter .
Create new entities Use the New action in the Persistence tool window to create XML configuration files, persistence units, entity classes and fields with their getters and setters, embeddable objects, mapped superclasses, entity listeners, object-relational mappings, and so on. Select an item and press Alt+Insert .
UPDATE:
In IntelliJ 16 this feature in now implemented. The steps to do it are:
You can read more here:
Feature request: allow "generate classes from database schema" for plain-JDBC developers
Note: The following information is about version 15 and earlier:
First, you need to tell IntelliJ that you are using Hibernate (I guess you are if you need the orm POJO of the table)
Now that you have set up your hibernate configuration facet, you can extract your POJOs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With