Chuck,
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