I know that Hibernate can create tables automatically, if the mapping from the domain model to columns is specified.
I am interested to know if Hibernate can actually create/design the table schema based on the domain model as well. For example I have classes that often have properties that are variable length col开发者_StackOverflow社区lections e.g. Set or ArrayList and I am curious to know how Hibernate would "design" the tables to fit these properties. But first I'd like to know if this is possible
I think these answer your question:
Reverse engineer DDL from JPA entities
Auto generate data schema from JPA annotated entity classes
精彩评论