Author | Message |
---|---|
ummata
Posts: 68
|
Posted 16:12 Oct 09, 2012 |
Hello all,
From Hibernate project, Hbm2ddl.java is a class to export SQL from java classes.
Do we have any tools that can bind java objects to database schema? |
cysun
Posts: 2935
|
Posted 17:07 Oct 09, 2012 |
You can change the Hbm2ddl code to export the schema directly to the database (see the API doc for SchemaExport), but a) you still have to manually run it, and b) I believe it drops then recreates all the tables instead of using ALTER TABLE. Generating ALTER TABLE is quite difficult. I don't know any tool that can do that (if you know one, please let me know because I certainly want to use it). |