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]
>
>
>
--
View this message in context:
http://www.nabble.com/hibernate-save-app-user%3A-%27Row-was-updated-or-deleted-by-another-transaction%27-tf4311701s2369.html#a12294904
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]