Hugo,
can you please create a bug report at http://bugzilla.exolab.org and attach
your sample ?
Werner
wg> -----Urspr�ngliche Nachricht-----
wg> Von: Hugo Ferreira [mailto:[EMAIL PROTECTED]
wg> Gesendet: Dienstag, 01. M�rz 2005 10:35
wg> An: [email protected]
wg> Betreff: [castor-user] Spurious line in M:M relation
wg>
wg>
wg>
wg> Hi,
wg>
wg> I am having trouble implementing an M:M relationship
wg> (castor version 9.6). The
wg> problem seems to stem from from an "extends" relationship.
wg> I have the
wg> following classes:
wg>
wg> Product
wg> Accomodation is-a Product
wg> ComposedProduct is-a Product with relationship (n)
wg> <------------> (n) Product
wg>
wg> I have the following tables (and relationships):
wg>
wg> Product ----------- OfferComposition ---------- ComposeOffer
wg> |
wg> |
wg> Accomodation
wg>
wg> Product, Accomodation and ComposedOffer contain the
wg> information for Product,
wg> Accomodation and ComposedProduct classes respectivelly.
wg> The table OfferComposition let me have the N:N relationship
wg> between a Product
wg> and a CompodesProduct.
wg>
wg> Problem: when I establish a relationship between the Product and
wg> ComposedProduct classes, the tables are filled in
wg> correctly. However when I
wg> add an Accomodation to the relationship I get an additional line in
wg> OfferComposition with an invalid id. Any extends
wg> relationship results in this
wg> spurious line.
wg>
wg> Interestingly: OfferComposition has two fields; one for the
wg> Product id, the
wg> other for the composed product. The spurious line contains
wg> the correct
wg> composed product id but has an id 0 for the extended product:
wg>
wg> composed : id = 2
wg> product: id = 1
wg> Accom: id = 3
wg>
wg> offer product
wg> 2 1 <------ ok, composed to related to normal product
wg> 2 0 <------ spurious line added only when adding relation
wg> composed to accom.
wg> 2 3 <------ ok, adding relation between relation and accom.
wg>
wg> Any way around this? I have code to show this, but is
wg> extensive and cannot
wg> attach it here (Java classes including test, mapping.xml,
wg> and databse DDL
wg> script). Any help is appreciated.
wg>
wg> TIA,
wg> Hugo Ferreira.
wg>
wg>
wg>
wg> -----------------------------------------------------------
wg> If you wish to unsubscribe from this mailing, send mail to
wg> [EMAIL PROTECTED] with a subject of:
wg> unsubscribe castor-user
wg>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user