Hibernate version: 3
I am writing an UML/MDA Application that generates hibernate mapping files.
After generating the mapping files I want to call the SchemaExport - Tool from my application.
Based on the Hibernate API docu I wrote this code.
My Problem is: How can I give the SchemaExport-Object the list of hbn.xml files for the ddl generation ?
Can I put them in the Configuration ?
Configuration cfg = new Configuration();
cfg.setProperty("hibernate.dialect", "org.hibernate.dialect.DerbyDialect");
cfg.setProperty("hibernate.connection.driver_class","com.ihost.cs.jdbc.CloudscapeDriver");
cfg.setProperty("hibernate.connection.url","jdbc:cloudscape:c:/temp/db");
cfg.setProperty("hibernate.connection.username","");
cfg.setProperty("hibernate.connection.password","");
SchemaExport exp = new SchemaExport(cfg);
exp.setOutputFile(targetFile);
exp.create(true, false);
|