Re: Back with weird problems: PK generation keeps generating same PK... up to a moment.
Re: Back with weird problems: PK generation keeps generating same PK... up to a moment.
- Subject: Re: Back with weird problems: PK generation keeps generating same PK... up to a moment.
- From: "ocs.cz" <email@hidden>
- Date: Tue, 19 May 2015 23:24:11 +0200
Chuck,
> On 19 5 2015, at 11:13 pm, Chuck Hill <email@hidden> wrote:
>
>> Well then, what if I, at the moment any EO gets inserted into an EC, immediatelly called permanentGlobalID for it?
>
> The original problem was caused, as best I can call, by FrontBase vending the same sequence number twice.
Which itself was (probably, far as I can say) caused by an exception during a transaction (namely, an exception triggered by an UNIQUE constraint) and rollback.
As always, I might be overlooking something of importance, but it seemed me that simple permanentGlobalID-triggered get-me-next-PK roundtrip would never ever cause an exception. The UNIQUE thing of course might cause an exception essentially any time -- *but*, when this happens, the PK will be already assigned, committed and safe. Thus it seemed to me...
> Doing what you describe won’t change or avoid that underlying problem. It will just change when it happens.
... it actually would avoid the problem -- by separating “a transaction during which a PK gets assigned” from “a transaction which might be aborted by the UNIQUE exception“.
But of course I might be missing some important point?
Thanks a big lot for all the help,
OC
_______________________________________________
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