• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: can't update a counter table
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >can't update a counter table (From: John Spicer <email@hidden>)

  • Prev by Date: Re: automated testing of site
  • Next by Date: Re: automated testing of site
  • Previous by thread: Re: can't update a counter table
  • Next by thread: [Newbie] MySQL "PASSWORD" in WO?
  • Index(es):
    • Date
    • Thread