max wrote:
we have a new ant task that handles that. will be released soon.
I have tried SchemaExport with annotations like below and it works.
Code:
Configuration config = new AnnotationConfiguration().
addPackage("a.b.c")
.addAnnotatedClass(Foo.class)
.addAnnotatedClass(Baz.class)
.setProperty("hibernate.dialect", "org.hibernate.dialect.OracleDialect")
.setProperty("hibernate.connection.driver_class", "oracle.jdbc.driver.OracleDriver")
.setProperty("hibernate.connection.url", "jdbc:oracle:thin:@mymachine:1521:orcl")
.setProperty("hibernate.connection.username", "me")
.setProperty("hibernate.connection.password", "my")
.setProperty("hibernate.connection.pool_size", "1");
SchemaExport schExp = new SchemaExport(config);
schExp.setDelimiter(";");
schExp.setOutputFile("HibSchema.sql");
schExp.create(true, false);
Is it the right way of exporting schema or we have to wait for new ant task?