I have an app I based on Cayenne 1.2M1, but having had some hard to trace
problems, I upgraded to cayenne 1.2M11. However, I now have a new problem
when I try to fill a many to many relationship:
Unable to invoke method onAccept on [EMAIL PROTECTED]:
[v.1.2M11 February 13 2006] Temporary ID hasn't been replaced on commit:
{<ObjectId:Answer, TEMP:80171E18C0A80091>; new;
[toOfferedAnswer=>{<ObjectId:OfferedAnswer, offered_answer_id=4>};
toPerson=>{<ObjectId:Person, person_id=7537>}]}
The code that breaks looks like this:
for (int i = 0; i < getChosenAnswers().length; i++) {
OfferedAnswer oa = (OfferedAnswer)getChosenAnswers()[i];
if (oa != null) {
Answer a = (Answer) context.createAndRegisterNewObject(
Answer.class);
oa.addToAnswerArray(a);
person.addToAnswerArray(a);
}
}
The Answer table hasn't got a primary key: it has two attributes
(OfferedAnswerID, PersonID) which are foreign keys to their respective
tables. It worked just fine up until I upgraded cayenne.jar. Are the .xml
files backwards compatible or do I need to upgrade them, too? What seems to
be the problem here?
TIA,
Tomislav