Hi Xavier,
I think I had the same problem. Solved it using different schema.xml
files. Example:
schemas: schema-A.xml, schema-B.xml.
build.xml: you have to add the following:
<.....snip......>
<target depends="init-tasks" name="A-om">
<torque-om contextProperties="${build.A.properties}"
controlTemplate="${OMControlTemplate}"
outputDirectory="${torque.home}/${outputDirectory}/java"
outputFile="report.A.om.generation"
targetPackage="com.mycompany.Apackage"
templatePath="${templatePath}"
xmlFile="${torque.home}/${schemaDirectory}/schema-A.xml"/>
</target>
<target depends="init-tasks" name="B-om">
<torque-om contextProperties="${build.A.properties}"
controlTemplate="${OMControlTemplate}"
outputDirectory="${torque.home}/${outputDirectory}/java"
outputFile="report.B.om.generation"
targetPackage="com.mycompany.Bpackage"
templatePath="${templatePath}"
xmlFile="${torque.home}/${schemaDirectory}/schema-B.xml"/>
</target>
I didn't put any package information in the schema files. Don't know if
it's the only way and if that answers your questions, but it worked for
me just fine.
Aleks
Xavier wrote:
>Hi all,
>
>I try several thing to generate om classes in different pachage with
>relation between classes in separate package... :-/ ... I din't get it
>
>I read several time
>http://jakarta.apache.org/turbine/howto/torque-schema-ref.html
>
>I'm looking for something like:
>
><!-- B A S E S C H E M A-->
><database>
>
> <table name="CLIENT" >
>
> <column name="ID" required="true" autoIncrement="true"
>primaryKey="true" type="INTEGER"/>
> <column name="NAME" required="true" size="99" type="VARCHAR"/>
>
> </table>
>
> <table name="TURBINE_USER" package="pf.cs.monapp.om.security">
>
> <column name="USER_ID" required="true" primaryKey="true"
>type="INTEGER"/>
> <column name="CLIENT_ID" required="true" type="INTEGER"
>javaName="clientId"/>
> <column etc.../>
>
> <foreign-key foreignTable="CLIENT">
> <reference local="CLIENT_ID" foreign="ID"/>
> </foreign-key>
>
> </table>
></database>
>
>So, it is possible to generate diff�rente package with one
>monapp-schema.xml?
>How that works?
>May be, it's possible to have something like monapp1-schema.xml and
>monapp2-schema.xml, include monapp1-schema.xml in the seconde file, to have
>the possibility to use the foreign-key element to refer a classe generated
>before from monapp1-schema.xml?
>
>
>Thanks for answers.
>Xa.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]