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?
CREATE TABLE EXERCISE (exerciseEJBPK OBJECT NOT NULL, ..., CONSTRAINT PK_EXERCISE PRIMARY KEY (exerciseEJBPK))
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:
should have been