Hello Paulo,
The RDB DAS does not yet directly support many to many relationships. YOu
can work around this by using two 1:m relationships where both Reserve and
Equipment has 1:m relationship with Reserve_Equipment. So, you have to
directly model the junction table.
--Kevin
On 4/20/07, Paulo Henrique Trecenti <[EMAIL PROTECTED]> wrote:
Hi,
I'm try using the DAS Relationship but I can not undestand, in my case I
try
make this
_________ __________
| Reserve | *_________*| Equipment |
|________| | |__________|
|
_______|____________
| Reserve_Equipments |
|__________________ |
Ok, one Reserve have many equipments, one equipment can be used by many
Reservers then I have a relatonship many to many.
My config file is
<Table tableName="RESERVE" typeName="Reserve">
<Column columnName="ID" propertyName="reserveID" primaryKey="true"
/>
<Column columnName="ROOM_ID" propertyName="roomID" />
<Column columnName="EMAIL" propertyName="email"/>
<Column columnName="DATEHOUR" propertyName="dateHour"/>
<Column columnName="REASON" propertyName="reasom"/>
</Table>
<Table tableName="EQUIPMENT" typeName="Equipment">
<Column columnName="ID" propertyName="equipmentID"
primaryKey="true"
generated="true" />
<Column columnName="NAME" propertyName="name" />
<Column columnName="QUANTITY" propertyName="quantity"/>
<Column columnName="TYPE" propertyName="type"/>
</Table>
<Relationship name="reserveEquipments" primaryKeyTable="RESERVE"
foreignKeyTable="EQUIPMENT" many="true">
<KeyPair primaryKeyColumn="ID" foreignKeyColumn="EQUIPMENT_ID" />
</Relationship>
This is correct ? If yes how I can insert into table RESERVE_EQUIPMENTS
using DataObject with ChangeSummary ?
--
Paulo Henrique Trecenti