Bugs item #530437, was opened at 2002-03-15 13:48 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=530437&group_id=22866
Category: JBossCMP Group: v3.0 Rabbit Hole >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Andrew Scherpbier (scherpbier) Assigned to: Dain Sundstrom (dsundstrom) Summary: Intra-Bean Many to Many auto-gen broken Initial Comment: When attempting to create an EJB that has a bidirectional many-to-many relationship with itself, JBoss attempts to create a relationship table that has duplicate columns. My bean (Company) has the following code: /** * @ejb:interface-method * @ejb:relation name="Companies-Investors" * role-name="investees" * multiple="yes" * @jboss:auto-key-fields */ public abstract Collection getInvestees(); /** * @ejb:interface-method * @ejb:relation name="Companies-Investors" * role-name="investors" * multiple="yes" * @jboss:auto-key-fields */ public abstract Collection getInvestors(); Upon deployment, JBoss produces the following SQL code for the database: CREATE TABLE Company_investees_Company_investors (Company TEXT NOT NULL, Company TEXT NOT NULL, CONSTRAINT pk_Company_investees_Company_investors PRIMARY KEY (Company, Company)) Note the duplicate column names. ---------------------------------------------------------------------- >Comment By: Dain Sundstrom (dsundstrom) Date: 2002-04-09 15:42 Message: Logged In: YES user_id=251431 I corrected the auto generation code for this case, and tested that the relationship actually works. ---------------------------------------------------------------------- Comment By: Dain Sundstrom (dsundstrom) Date: 2002-03-15 14:10 Message: Logged In: YES user_id=251431 oh ya, duh. I'll fix this. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=530437&group_id=22866 _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development