Subject Re: [IBO] Pessimistic locking problem (possibly OT)
Author Svein Erling Tysvær
I can see one potensial problem with your solution: What if a user creates
a document, then insert into change before cancelling the document? This
kind of scenario can never work with a FK.

But you do not mention anything about that bit, so I assume you have
thought about that situation.

For your current problem, I suggest you add another table - a copy of the
document table populated through triggers on the document table. Then set
the foreign key to point to this new table.

I'm not certain this will work, but it is worth a try.

>This email and any files attached is intended for the addressee only and may
>contain information that is confidential and/or legally privileged.
>Unauthorised use is strictly prohibited and may be unlawful. If you are not
>the addressee, you should not read, copy, disclose or otherwise use this
>message, including any attachment, except for the purpose of delivery to the

Oops. Admittedly I read it. Hopefully I only did something stricly
prohibited and not unlawful...