mapping M:N relation WITH ATTRIBUTES
I need to store some audit values on my mapping tables, in addition to the foreign key values. One of them is the application user name, others are timestamps that are set on the database. Is there any possibility that I can tell OJB which value to use for the user audit column when inserting a new relation? Thank you very much for your help! Cheers, Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mapping M:N relation WITH ATTRIBUTES
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]
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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mapping M:N relation WITH ATTRIBUTES
Where would the Comment field be stored in the Java objects ? If you have a separate Java class for the connection between Employees and Companies which contains the Comment field, then you already have manual decomposition (see http://db.apache.org/ojb/tutorial3.html#Manual%20decomposition%20into%20two%201:n%20associations). Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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]
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]