• 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: EOF inserts PK automatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOF inserts PK automatically


  • Subject: Re: EOF inserts PK automatically
  • From: Anjo Krank <email@hidden>
  • Date: Mon, 22 Nov 2004 11:52:02 +0100


Am 22.11.2004 um 11:36 schrieb Sako!:

i still dont see any reason WHY should i do not do this?
the disadvantage is, the DB will update the same col. twice :)

I'm not so sure: EOF might not use the same transaction for getting the key number as you are - so then a likely scenario is


- EOF gets a PK (30) from EO_PK_TABLE or whatever, which is currently the highest PK (29) + 1
- other code directly inserts an object, commits, the highest PK is now 30
- you insert: bang, tried to insert duplicate PK


So the only real way to do this is to use the *same* means for generation for all or at least disable concurrent access.

Cheers, Anjo

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: EOF inserts PK automatically
      • From: "Sako!" <email@hidden>
References: 
 >Re: EOF inserts PK automatically (From: "Ruenagel, Frank" <email@hidden>)
 >Re: EOF inserts PK automatically (From: Anjo Krank <email@hidden>)
 >Re: EOF inserts PK automatically (From: "Sako!" <email@hidden>)

  • Prev by Date: Re: EOF inserts PK automatically
  • Next by Date: Re: EOF inserts PK automatically
  • Previous by thread: Re: EOF inserts PK automatically
  • Next by thread: Re: EOF inserts PK automatically
  • Index(es):
    • Date
    • Thread