Re: EOF inserts PK automatically
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