If the customer wants a last write win, I don't use version at all

On Wed, Sep 23, 2009 at 7:44 AM, Tyler Burd <[email protected]> wrote:

> Ayende, you really overwrite the version number all of the time?  I've
> found that in the most cases clients are happier with a last-write-wins
> solution.  They seem to prefer that to the
> user-encounters-a-stale-state-error solution (even if that is presented in a
> nice "another user has modified the data" view).  For me, at least, it
> depends on the use case.
>
>
> On Tue, Sep 22, 2009 at 5:57 AM, [email protected] 
> <[email protected]>wrote:
>
>>
>> That makes sense. I didn't think of overwriting the version number.
>>
>> Thanks
>>
>>
>> On Sep 22, 3:24 am, Ayende Rahien <[email protected]> wrote:
>> > You can let NH do the version check for you.
>> > Well, not only can, but should. There are concurrency issues if you
>> check it
>> > yourself.
>> > When you set the data from the user, you *must* overwrite the version
>> number
>> > with the value that was there when the user saw the page.
>> >
>> > On Tue, Sep 22, 2009 at 4:00 AM, [email protected] <
>> [email protected]>wrote:
>> >
>> >
>> >
>> >
>> >
>> > > Hi,
>> >
>> > > In Open-Session-In-View pattern, a new session is created at the
>> > > beginning of each request and close before rendering to the browser.
>> >
>> > > Say I have a User edit form. I load the user object and bind it to the
>> > > form controls. The session is terminated before rendering it to the
>> > > browser. I make some changes to the user object and save it. At this
>> > > point a new session is created at the server.
>> >
>> > > Before saving the edited user to the database, I am loading the user
>> > > object and manually checking the version to make sure that nobody else
>> > > updated the user record and then save the user object.
>> >
>> > > I just wanted to know how others are managing detached objects in
>> Open-
>> > > Session-In-View pattern.
>> >
>> > > Thanks
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to