thanks for reminding me about that... but it will not effect my problem.

some how hibernate 'thinks' the user object is changed....

tibi

arvinder wrote:
I do not know if it will solve your but in 2.0m5 you should be using
candidate = candidateManager.save(candidate);
instead of
candidateManager.save(candidate);


tibi-3 wrote:
i use struts/spring/hibernate
with appfuse 2.0m5
tibi

arvinder wrote:
What is your appfuse environment?

tibi-3 wrote:
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]



---------------------------------------------------------------------
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