Subject: Re: Mapping Auto-generation From: "Stephan Merker" Date: Fri, 2 Aug 2002 09:10:10 +0200 To: "OJB Users List" I'm using torque to generate a torque XML schema from the database tables and then a stylesheet to translate it into the OJB repository file. Works pretty well. 1. Add the following properties to build.properties of the OJB project: databaseSchema=TC schema.package=de.cegedim.iss.tc.cm.bdo 2. Run the project-jdbc target of build-torque.xml. 3. Apply the stylesheet torqueSchema2OjbRepository.xslt: The stylesheet is based on a stylesheet contributed to the Castor project. Since I'm using Castor XML in my project, the stylesheet generates some tags that are required for Castor XML (namespace, bind-xml, description, etc.). You may need to modify the stylesheet to get rid of the Castor stuff. In fact, the generated mapping.xml is translated further into a mapping.ojb.xml (stripping away all Castor extensions) and into a mapping.xsd that is the input for Castor's source generator. In addition, the stylesheet uses some heuristics for conversions and datatypes that probably won't match your project. Hope it helps, Stephan