• 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
duplicate pk error: recovering from
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

duplicate pk error: recovering from


  • Subject: duplicate pk error: recovering from
  • From: Jonathan Rochkind <email@hidden>
  • Date: Fri, 03 Jan 2003 11:47:33 -0600

Let's say I know I'm about to perform an insert to the db which might result in a "cannot insert duplicate pk" excpetion. I want to CATCH this exception, and then RECOVER from it. That is, restore the EOF stack so it's not trying to insert that bad EO anymore, it just gets rid of the bad EO.

I can't quite figure out how to catch that exception, nor can I figure out how to recover from it. At the moment, once that exception occurs, my EOEditingContext is permanently polluted. Every time I try to saveChanges on that EC again, it will again try to insert the duplicate pk, and again get the exception.

Anyone have any hints?

--Jonathan
_______________________________________________
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.

  • Prev by Date: no database channel available exception?
  • Next by Date: Re: no database channel available exception?
  • Previous by thread: no database channel available exception?
  • Next by thread: Re: duplicate pk error: recovering from
  • Index(es):
    • Date
    • Thread