3 Replies Latest reply on Dec 1, 2003 11:07 AM by sandros

    Primary key class with CMR attributes???

    marcosjara

      Hi!

      It would be thankful to him help me.!!

      There is the situation:

      I have 3 tables
      -------------------

      1. Student(c_id, c_name)
      PK = cd_id

      2. Language(l_id, l_name)
      PK = l_id

      3. Student_Language(c_id, l_id, read, write, talk)


      I have 3 Entity EJB that represent the tree tables and i'm want to use primary key classes to identity each entity.

      The Student and Language has not problem to create a primary key why it's use a Integer CMP field especified in the deployment descriptor.

      The problem is that i don't create a primary key class for the Student_Language entity because the key for the tables are not CMP fields, there is a CMR fields representated for c_id and l_id fields.

      How i can resolve it!

      In the EJB Espect 2.1 especify that primary key class must have a CMP fields but not say nothing about CMR field.

      I can put the CMR column as the primary key class atributes to represent a primary key?