thanks for the reply.
no i don;t have a version field.
i now need to do the following annoying part:

//        candidateManager.save(candidate);
//       gives errors so need to do the following:

       User user = candidate.getUser();
       User user2 = userManager.getUser(""+user.getId());
       user2.setFirstName(user.getFirstName());
       candidate.setUser(user2);
candidateManager.save(candidate);


any help would be very welcome ;)

tibi


arvinder wrote:
Do you have a version field in the candidate entity? If yes, Are you
populating it in the action when you fetch the data for edit?
Arvinder

tibi-3 wrote:
hi,

i have a candidate which has a one-one relation to user
when i save candidate i want to save changes to the user too.
but i get an:
'Object of class [org.appfuse.model.User] with identifier [3]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.appfuse.model.User#3]'

error.

any ideas?

thanks,


tibi

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to