M:N mapping can be done using a indirection table to store relational information. In that case OJB uses a class called MtoNImplementor that holds the fk values that must be inserted onto the indirection table. There is a problem if you want to store more data other than the fk values, thats wy I�m planning to make MtoNImplementos configurable in your repository.xml file so that ojb uses your implementation to map M:N . Please see PersistenceBrokerImpl MtoN related methods.
On Mon, 8 Dec 2003 10:59:08 +0100, "Reda Benzair" <[EMAIL PROTECTED]> escreveu: > De: "Reda Benzair" <[EMAIL PROTECTED]> > Data: Mon, 8 Dec 2003 10:59:08 +0100 > Para: "'OJB Users List'" <[EMAIL PROTECTED]> > Assunto: mapping M:N relation WITH ATTRIBUTES > > > Hi Rodrigo > Thank you very much for your response > I have another question? > I can have more information on your implementation for this problem of > MtoNImplementors ? > What is your solution > And can Help you for implemente this solution > Because this problem is very important for my application and my only > the solution for me at this time is convert the M:N to 1:N but is bad > solution !!!!! > > > > -----Original Message----- > From: Leandro Rodrigo Saad Cruz [mailto:[EMAIL PROTECTED] > Sent: mercredi 3 d�cembre 2003 14:40 > To: OJB Users List > Subject: Re: mapping M:N relation WITH ATTRIBUTES > > Hi Reda. I�m working on this problem through the implementation of > specific MtoNImplementors. > I dunno when I�ll be able to finish this.. but this is supposed to solve > problems like yours. > > On Wed, 3 Dec 2003 13:22:54 +0100, "Reda Benzair" > <[EMAIL PROTECTED]> escreveu: > > > De: "Reda Benzair" <[EMAIL PROTECTED]> > > Data: Wed, 3 Dec 2003 13:22:54 +0100 > > Para: "'OJB Users List'" <[EMAIL PROTECTED]> > > Assunto: mapping M:N relation WITH ATTRIBUTES > > > > Hi all, > > > > I would like to map an M:N relation WITH ATTRIBUTES but seem to be > > unable to do it with OJB... > > By "WITH ATTRIBUTES" I mean that there is typically some more fields > in > > the indirection table than just foreign keys. > > Do I have to use 1:N N:1 mapping instead? > > > > A dummy example: > > > > Table Employee Table Employee_Company (M:N) Table > > Company > > -------------- --------------------------- > > ------------------ > > EMP_ID CPY_ID CPY_ID > > NAME EMP_ID NAME > > Comment > > > > > > > > How can I map the "Comment" field if I use a M:N mapping? If it's not > > possible today, will it ever be? when? > > > > > > > > I'm currently using RC4 with Oracle 8i. > > > > > > > > I thank you in advance, > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > -- > Leandro Rodrigo Saad Cruz > IT - Inter Business Tecnologia e > Servi�os (IB) > http://www.ibnetwork.com.br > http://db.apache.org/ojb > http://xingu.sf.net > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- Leandro Rodrigo Saad Cruz IT - Inter Business Tecnologia e Servi�os (IB) http://www.ibnetwork.com.br http://db.apache.org/ojb http://xingu.sf.net --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
