This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
DEVICE_EQ_TYPE, DEVICE_STN_ID and DEVICE_UNIT_ID are FKs too.
"Generated" entities look like:
and there are some other entities which i guess (and hope) are of not much value in this context.
I need to create a Job and SubJob in the same application managed transaction.
The JPA entity managers/controller are generated.
Note: managers/controller have been modified so that they dont have to manage transactions.
Here is the code that I have written:
The error stack is:
&lt;openjpa-1.2.1-SNAPSHOT-r422266:707222 fatal store error&gt; org.apache.openjpa.persistence.RollbackException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.
... 38 more
Caused by: &lt;openjpa-1.2.1-SNAPSHOT-r422266:707222 nonfatal user error&gt; org.apache.openjpa.persistence.ArgumentException: Field "entity.SubJob.pk" of "entity.SubJob@577a577a" can not be set to "entity.SubJobPK@84933dcf" value.