Auto generate data schema from JPA annotated entity classes

后端 未结 9 1546
滥情空心
滥情空心 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:16

    With EclipseLink, you should add property:

    
    

    As it is said here: http://www.eclipse.org/eclipselink/documentation/2.4/jpa/extensions/p_ddl_generation.htm

    My persistence.xml:

    
    
        
            org.eclipse.persistence.jpa.PersistenceProvider
            LocalMySQL
            entity.Us
            entity.Btl
            entity.Co
            
                
            
        
    
    

提交回复
热议问题