0 Replies Latest reply on Dec 5, 2002 10:28 PM by Erik Sliman

    CMP/CMR problem with intersecting entity

    Erik Sliman Apprentice

      I'm upgrading a functional JBoss 2.4 app to 3.0 (OpenStandards.net). I've run into some strange quirks, all with CMP/CMR.

      One problem is that when I define a relationship it then generates SQL with duplicates for the foreign keys. It appears to create one for the abstract getForeignKey() and other for getForeignObject().

      For one relationship, commenting out all the foreign key get/sets and CMP field definitions worked. I just use the object relationships.

      However, this tactic hasn't worked for an intersecting entity where the two foreign keys are

      (1) part of the composite primary key
      (2) the only columns in the table

      It now generates a SELECT statement without listing any columns to select:


      So, the question is, how do I get it to select the columns while ensuring that it duplicate foreign keys in the SQL without breaking the relationships and queries.

      Thank you in advance,