I cleaned up the annotations for openJPA 1.2.2. Now the Account entity is as follows:
/* snip */ @OneToMany( fetch=FetchType.EAGER, cascade=CascadeType.ALL, targetEntity=Activity.class,mappedBy="account") private Set<Activity> activities = new HashSet<Activity>(); /* snip */ The Activity entity is as follows: /* snip */ @ManyToOne(fetch=FetchType.EAGER, targetEntity=Account.class) @JoinColumn(name="ACCOUNT_ID", referencedColumnName="ACCOUNT_ID") @ForeignKey private Account account; /* snip */ I'm still getting failure on the persistence of the Account entity. Ideally, this is what I want to happen. 1) Retrieve accounts and the associated activities 2) Add new activities to the account 3) Update the account description 4) Persist the account and all of its activities ----- Seth Jackson -- View this message in context: http://n2.nabble.com/openjpa-1-2-2-Optimistic-Lock-Exception-tp4842528p4853081.html Sent from the OpenJPA Users mailing list archive at Nabble.com.
