I understand what you mean now. Yes, Middlegen (CVS) does that if you set the many2many attribute of the <middlegen> task to true. (It defaults to false). Here is a sniplet of the docs under middlegen/docs/ant.html:
"Set this to true if you want Middlegen to detect many-to-many relationships. If Middlegen stumbles upon three tables A, B and C where A and C have many Bs, it will consider A-C a possible many-to-many relationship where B is the join table." The CMR examples you refer to in XDoclet were actually produced by Middlegen ;-) One comment: You're saying that this kind of relation is "most commonly used for bi-directional many to many relationships". Aren't they *always* m:n? -Or did you mean "always used for many to many relationships, most commonly bi-directional ones". I'm not trying to be picky here, just wondering if you're referring to a concept I'm unfamiliar with. Cheers, Aslak -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED] Sent: 28. juli 2002 11:36 To: Aslak Hellesoy Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [Middlegen-user] Relation Table Relations Hi, There are 2 styles of relations that can be defined between Entity beans (how you do it is container specific). The first is via Foreign Keys, i.e. The table for one bean has a column(s) that represent the primary key(s) of the related bean and its table. The other is via a sperate Relation Table - one that has no coresponding entity bean. This relation table basically contains primary key information linking the two beans and is most commonly used for bi-directional many to many relationships. The XDoclet ejb cmr example illustrates all this very nicely. They are catered for in XDoclet 1.1 for Websphere, and now for JBoss 3 in XDoclet 1.2 (the CVS head version). Regards, Sean Aslak Hellesoy <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 28/07/2002 04:33 To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> cc: Subject: RE: [Middlegen-user] Relation Table Relations Hi Sean. I don't understand your question. Can you be more technical? Aslak -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED] Sent: 27. juli 2002 23:06 To: [EMAIL PROTECTED] Subject: [Middlegen-user] Relation Table Relations Hi, Can MiddleGen create Relation Table style relations for the entties? (and if so how?) (I'm using JBoss by the way) Thanks, Sean ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ middlegen-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/middlegen-user
