When committing changes to a Apache Cayenne context, I get an exception like the following.
org.apache.cayenne.CayenneRuntimeException: [v.3.0.1 Sep 06 2010 15:09:38]
Temporary ID hasn't been replaced on commit
Why does this exception occur?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You are trying to commit an object for which Cayenne does not know how to generate a permanent id. This in turn typically happens when the underlying table has no primary key defined.
To solve the problem, do one of the following.
PersistentObject.setObjectID()method.