Thank you for your fast reply! I am only now getting around to this. However, I think the way you described it it will make hibernate initialize the Schema in the database?
My idea was to use the hbm2dll ant task from the hibernate-tools to create a schema_dll.sql file from the hibernate configuration: http://www.hibernate.org/hib_docs/tools/reference/en/html/ant.html However, I know find that the ant task needs a hibernate.cfg.xml file, and I think there isn't one, because all Hibernate settings are in the SessionFactory.xml instead? Is there a way to generate the hibernate.cfg.xml in addition to the SessionFactory.xml (the hibernate.cfg.xml just for use for the ant task)? Or another, easier way to accomplish what I am looking for? What is the rationale for Fornax to not use the hibernate-tools and provide it's own schema generation mechanism? I am curious - for me using the hibernate-tools seems the easier way, because I hope I won't need any knowledge about DB2 (which I don't have). But maybe the hibernate-tools are not so reliable? Patrik Nordwall wrote: > > That is possible. Try this... > > Add to sculptor-generator.properties: > generate.ddl=false > db.product=db2 > db.db2.maxNameLength=27 > db.db2.hibernate.dialect=org.hibernate.dialect.DB2Dialect > db.db2.onDeleteCascade=false > > Add to SpecialCases.xpt: > «AROUND *::hibernateConnectionDatasourceProperties FOR Application» > <prop key="hibernate.hbm2ddl.auto">create-drop</prop> > «targetDef.proceed()» > «ENDAROUND» > > The last thing will add the hbm2ddl property to the SessionFactory > definition. > > /Patrik > > -- View this message in context: http://www.nabble.com/Using-hbm2dll-to-generate-database-schema--tp17205218s17564p17271264.html Sent from the Fornax-Platform mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Fornax-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fornax-developer
