How can I create a ddl for my jpa entities from java code?

前端 未结 5 943
伪装坚强ぢ
伪装坚强ぢ 2021-02-11 08:15

I look for a way how I can create a ddl for my jpa annotated entities. I prefer a pure java way for this.

If possible it would be nice to have generate the drop statemen

5条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-11 08:54

    Here's an explaination of how to use the hibernate SchemaExport class to do exactly what you want.

    http://jandrewthompson.blogspot.com/2009/10/how-to-generate-ddl-scripts-from.html

    Hope this helps.

提交回复
热议问题