Generate JPA 2 Entities from existing Database

前端 未结 9 871
春和景丽
春和景丽 2020-11-28 05:52

How can I generate JPA2 compliant @Entity from existing Databases?.

I found this: Question

Still its not clear if JBoss will generate compliant JPA2 and also

相关标签:
9条回答
  • 2020-11-28 06:15

    Eclipse provides this function for some time now (origination from Dali, included since Kepler version). Just right-click on your JPA project -> JPA Tools -> Generate Entities from Tables:

    0 讨论(0)
  • 2020-11-28 06:16

    Does "generate entities from table" option works for H2 database?, I always find the schema list to be empty in the Select tables step even though I have a valid connection setup with H2 database using Generic JDBC driver.

    The same connection is showing tables in hibernate-tools. For example when i create a reverse engineering xml in its editor, I can refresh the tables tab and see a full list. I dont know if hibernate tools is relevant as it might be using console configuration instead.

    0 讨论(0)
  • 2020-11-28 06:20

    There is an option in the Netbeans IDE to generate entities from a database.

    0 讨论(0)
提交回复
热议问题