Re: can't update a counter table
Re: can't update a counter table
- Subject: Re: can't update a counter table
- From: Art Isbell <email@hidden>
- Date: Fri, 30 Apr 2004 10:13:38 -1000
On Apr 30, 2004, at 9:54 AM, John Spicer wrote:
For now, early development, we are using a table with one attribute
(nextID) to store a value for the next event ID to be used in the
system.
The idea is fairly simple: get the value, use it, add 1, and write it
back out.
What do you do to prevent another process from getting the same value
prior to it being incremented by the current process?
However, sometimes for reasons yet unclear (hence this post), the new
value is not written in the table.
Might the problem be that another process has incremented the value so
that when you try to save the value incremented by the current process,
an optimistic locking failure occurs? When you send saveChanges() to
the editing context, is an exception being raised? Is saveChanges() in
a "try" block?
Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.