Auto generate data schema from JPA annotated entity classes

后端 未结 9 1532
滥情空心
滥情空心 2020-12-12 17:43

I\'m using JPA (Hibernate\'s implementation) to annotate entity classes to persist to a relational database (MySQL or SQL Server). Is there an easy way to auto generate the

9条回答
  •  無奈伤痛
    2020-12-12 18:24

    
    

    Add the above code in the persistence.xml under properties tag. "update" will create the table when first time you run your code, after that, only update the table structures if any changes in domain object.

提交回复
热议问题