-
1. Re: Database schema generation with Annotations
ijb Jan 15, 2008 4:54 PM (in response to hubaghdadi)yes
-
2. Re: Database schema generation with Annotations
ijb Jan 15, 2008 4:57 PM (in response to hubaghdadi)I am sorry I've clicked button too soon. Here is a sample from one of our targets that does exactly that:
<target name="schemaexport" depends="compile" description="Exports a generated schema to DB and file"> <hibernatetool destdir="${source.root}"> <annotationconfiguration configurationfile="${class.root}/hibernate.cfg.xml"/> <hbm2ddl drop="true" create="true" /> </hibernatetool> </target>
-
3. Re: Database schema generation with Annotations
slumbergiant Apr 16, 2010 4:42 PM (in response to ijb)I've done the rounds on google, but dead-ended in jar versioning or other issues, such as the relevant hibernate docs pages 404ing. What seemed like a nifty idea using pojos -> schema generation has turned into a 16 hour waste of time.
I have to ask if there is a simple project somebody can post listing jar files and where to get the _correct_ versions that work together, the necessary xml files (ant, hibernate, perisistence whatever) just something that can produce a .sql file for a simple java class.
I tried this thinking it would be easier than generating db tables and reverse engineering it, but unfortunately this isn't the case. I have to say this exercise hasn't save me any grief or typing. I could have developed the tables and written by hand the java classes in this amount of time.
Sorry to send a nasty-gram, but that has been my experience.