Subject Re: [firebird-support] Compound foreign key & null value bug?
Author Ann Harrison
Rick,


> I forgot to populate the new column in the child table, so all the
> relationships looked like this:
>
> Child Parent
> ----- ------
> Col1:null -> Col1:A
> Col2:B -> Col2:B
>
> The new foreign keys were created without any errors. Since (null,B)
> doesn't match anything, shouldn't the creation have failed?
>


Since you want a quick answer, I believe that behavior follows the
standard. I have it in front of me, but digging out the expected null
behavior is a pain, but from the fact that one of the acceptable behaviors
of a cascading update or delete is to set the matching field(s) in the
child table to null, I'd have to say that for foreign key relationships a
null in the referencing field is considered to match.

Good luck,

Ann


[Non-text portions of this message have been removed]