Perhaps I should have spelt out the "feature". You can't have two foreign keys from one table on to
another. This is not a dodgy requirement of a non-normalised database. Consider for example
a CreatedByUser and a LastUpdatedUser column in a table, both referencing a Users table,
ONLY DIFFERENT ROWS as per the example in MS page:
If it was a feature, the words " this behaviour is by design " would appear somewhere on the page.
So I'll stand by my "broken" assertion. Unless a "feature" is a bug thats NotWorthIt/TooHard to fix?
Still I suppose ( grudgingly ) it's better than Oracle's "mutating table" offal. I just did not want to have
to go back to triggers instead of DRI. I do not think your response addresses this.
Oh well, triggers are my friend
"David Portas" <org> wrote in message
> The error message is a feature rather than a bug.
> Without knowing more about your requirement it's difficult to advise. Maybe
> you should drop the two foreign keys from the Refs table and put them in a
> joining table:
> CREATE TABLE JoiningTable (someid INTEGER NOT NULL REFERENCES Refs(someid)
> ON UPDATE CASCADE ON DELETE CASCADE, myid INTEGER NOT NULL REFERENCES
> ForKey(myid) ON UPDATE CASCADE ON DELETE CASCADE, PRIMARY KEY (someid,myid))
> David Portas
> Please reply only to the newsgroup