On 22. Apr 2006 - 09:17:49, James Carman wrote: | 1. Well, here's what would happen. Suppose I want to update a Person | object on my EditPerson page. I use the "session" persistence strategy and | I just store the id of the person. So, I render the EditPage and it shows a | form. I edit some values and I submit my request. Suppose someone beat me | to the punch, though. While I was sitting there looking at the data from | this Person object and contemplating what their real first name should be, | someone else used the edit page to update the exact same Person object. | When my request comes in, I'll do a Hibernate query to lookup the Person | object (by id) in the database. I'll set some properties on it and commit | my changes. Since I got the current values out of the database by querying | for the object, my request will work just fine and I will have overwritten | the changes the other user has done. If I use the "entity" persistence | strategy (my implementation), I will be updating an object that has the old | version number in it. Hibernate will throw an exception and I will not be | allowed to overwrite the changes the other user has done.
Does this problem still exist if I use the "session" strategy but persist the whole Person object? If I understood you correctly this means that your implementation is currently not complete as the part which saves only the id in the session is missing, right?! Or did you mean with your third sentence that you do something like this @Persist public abstract Integer getPersonId(); public abstract void setPersonId(Integer personId); Cheers, Andreas --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
