• 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 11:36:15 +0100

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

nothing more.

remember the DB see an insert as an atomic unit. All or nothing.
EOF works like this.
1. read last PK from EO_PK_Table ex. 30
2. increase col in EO_PK_Table. ex. 31
3. Finish for DB. for now.
4. EOF tries to insert a row with pk.
5. DB
    a. insertes row
    b. updates col in EO_PK_Table. with the SAME PK. ex. 31.
6. is 5 Atomic Unit successful? Finish for DB. else Error.
over.


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


>
> Am 22.11.2004 um 10:00 schrieb Ruenagel, Frank:
>
> > Dear Chuck, are there any reasons why this should not work?
>
> For starters, you can't use DB triggers or reasonable constraints on
> your fake record, you are (AFAIK) acting outside of the transaction
> that does the actual insert, your concurrent searches might find this
> dummy record and if I'd actually put my mind into, I'd probably find
> half a dozen more reasons why you shouldn't do this...
>
> 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
>
>

 _______________________________________________
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: Anjo Krank <email@hidden>
    • Re: EOF inserts PK automatically
      • From: Anjo Krank <email@hidden>
References: 
 >Re: EOF inserts PK automatically (From: "Ruenagel, Frank" <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