duplicate pk error: recovering from
Jonathan Rochkind <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.eof |
|---|---|
| Message-ID | <[email protected]> |
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