1 Reply Latest reply on Aug 22, 2002 7:13 AM by mortena

    cmr create table bug??

    mortena

      I try to investigate the reason to a failure in my application, (see http://jboss.org/forums/thread.jsp?forum=46&thread=19880)

      The failure arises as I try to call
      setExercise(ExerciseLocal exercise) on a ExerciseResult bean.

      I think this happens because the table for the ExerciseResult bean contains a varchar(256) column where the exercise should have been. It should probably have been an exercise OBJECT.

      CREATE TABLE RESULT (id OBJECT NOT NULL,..., student VARCHAR(256), exercise VARCHAR(256), CONSTRAINT PK_RESULT PRIMARY KEY (id))

      The Primary key for the student is a String while the primary Key is an Object with a number from the cmp-fields of the Result.

      Is this a bug??

      I don't know how to solve this... Any suggestions?

      Morten Andersen


      CREATE TABLE EXERCISE (exerciseEJBPK OBJECT NOT NULL, ..., CONSTRAINT PK_EXERCISE PRIMARY KEY (exerciseEJBPK))

        • 1. Re: cmr create table bug??
          mortena

          The bug is found, of course it was in my own code...

          In my relation I had the exercise relation pointing to a Student instead of an Exercise:

          <relationship-role-source><ejb-name>Student</ejb-name></relationship-role-source>

          should have been

          <relationship-role-source><ejb-name>Exercise</ejb-name></relationship-role-source>