Clone a Table's definition with Hibernate (hbm2ddl)
问题 In my hibernate application there is annotation driven object: AuditEvent . Its very simple and has no foreign key relationships. I archive old entries in this table by moving them to another table OldAuditEvent , which is a clone of the AuditEvent table. Right now we generate the DDL for the entire application using hbm2ddl (on our annotated datamodel) and manually copy/paste the AuditEvent table and change its name to create OldAuditEvent . I want to automate the build process, is there any