Doug and Locking Optimistic
> On Jan 22, 2018, at 3:32 PM, Das Goravani <email@example.com> wrote:
>> 2) optimistic updates makes for a better user experience.
> It’s so rare that one encounters a locked record as customer A can only be talking to one rep at a time usually… somebody else needing the record is so very rare
This is not strictly true. In a large system people are doing diverse stuff.. and you might want to use a transaction boundary using $begin() and $commit() to update many records at one time.
think an invoice.. which might update invoice lines, which might update order balances, which might update inventory, which might update and send emails to vendors to reorder,
thats pretty common and important to do in a transaction boundary so that all parts of the system have logical integrity (this is something you just can’t do with DML).
and somebody updating the invoice file to say some new product has arrived — and now they are locked out of an edit.
how you handle the conflict is up to you. On data entry screens, we simply tell the user… somebody else changed it, you loose, please look at the new record andf retype your changes.
and, as you say, if it doesn’t happen very often, then its probably better to display an error and let the user reconcile it … rather than have the system save half the changes and throw away the other half. that would be unexplainable.
see you at the third annual users conference
Manage your list subscriptions at lists.omnis-dev.com