• 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: "Sako!" <email@hidden>
  • Date: Mon, 22 Nov 2004 12:19:32 +0100

----- Original Message -----
From: "Anjo Krank" <email@hidden>
To: "Sako!" <email@hidden>
Cc: "Ruenagel, Frank" <email@hidden>;
<email@hidden>
Sent: Monday, November 22, 2004 11:52 AM
Subject: Re: EOF inserts PK automatically


>
> 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
i am quite sure :)
>
> - EOF gets a PK (30) from EO_PK_TABLE or whatever, which is currently
> the highest PK (29) + 1
Wrong.
> - other code directly inserts an object, commits, the highest PK is now
> 30
Wrong
> - you insert: bang, tried to insert duplicate PK
could happen, therfore you must program your Trigger that it works correct
:)

>
> So the only real way to do this is to use the *same* means for
> generation for all or at least disable concurrent access.
good idea.
my suggession is better.
>
> Cheers, Anjo
Cheers, Sako.

>
>
>

 _______________________________________________
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

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>)
 >Re: EOF inserts PK automatically (From: Anjo Krank <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