ah, you are using the javaName attribute. Ok, this should work:
<column
name="o_o_otype"
javaName="itemTypeId"
required="true"
type="INTEGER"
description="Book Title"/>
...
<foreign-key foreignTable="o_types" >
<reference
local="o_o_otype"
foreign="o_t_id" />
</foreign-key>
Torque should then generate int getItemTypeId() and ItemType getItemType().
so long
Michael
> -----Original Message-----
> From: E.Nebrat [mailto:e.nebrat@tacisenergy.org.ua]
> Sent: Wednesday, February 18, 2004 12:24 PM
> To: Apache Torque Users List
> Subject: Re: please help with complexObjectModel
>
>
> I didn't know about any schema-elements naming rules from docs... But
> anyway there is something else here...
>
> >I guess your column is named exactly as the related table, eg. foreign
> >column name ="SomeTable" and related table name="SomeTable".
> >
> This is my schema fragment. Could you point me, what's wrong? Thank you.
>
> <table name="o_objects" javaName="Item" idMethod="idbroker"
> description="Objects Table">
> ...
> <column
> name="o_o_otype"
> javaName="itemType"
> required="true"
> type="INTEGER"
> description="Book Title"/>
> ...
> <foreign-key foreignTable="o_types" >
> <reference
> local="o_o_otype"
> foreign="o_t_id" />
> </foreign-key>
>
> </table>
>
> and
>
> <table name="o_types" javaName="ItemType" idMethod="idbroker" >
> <column
> name="o_t_id"
> javaName="itemTypeID"
> required="true"
> primaryKey="true"
> type="INTEGER"
> description="Object Type Id"/>
> ....
> </table>
>
> --
> BR, Eugene Nebrat.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.591 / Virus Database: 374 - Release Date: 17.02.2004
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.591 / Virus Database: 374 - Release Date: 17.02.2004
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
|