Schema export with hibernate annotations

前端 未结 4 1663
萌比男神i
萌比男神i 2021-02-13 12:35

I\'m using hibernate annotations and i want to export my database schema.

Similar to the schemaexporttask with hbm xml files.

4条回答
  •  梦毁少年i
    2021-02-13 12:53

    Indeed, the original Hibernate Core SchemaExportTask can only handle Hibernate XML mapping files, not annotations. What you need is the HibernateToolTask that comes with Hibernate Tools.

    Here is an Usage example adapted from Java Persistence With Hibernate:

    
      
        
          
          
          
        
    
    

    See also

    • Hibernate 3 Annotations & Ant

提交回复
热议问题