On 2012-10-16 10:21, Patrox wrote:
Hi !
While testing an application we realized than H2 1.3-168 seems to not
handle properly FOREIGN KEYs defined between 2 tables when a same
foreign key is defined with more than a single field.
For example such a FK (below) does not raise a violation when
inserting bad datas in the couple supposedly protected by the FK. It
seems to me it behaves like 2 separates FKs on single fields, while it
is NOT the expected behavior. A composite FK is supposed to protect
the data combination, not single separate fields values.
ALTER TABLE
TEST_POSSIBLE_BUG
ADD CONSTRAINT FK_TEST001
FOREIGN KEY (tpg_aaa_id,tpg_bbb_id)
REFERENCES MASTER_TABLE (aaa_id,bbb_id);
Can you provide a self-contained test case please?
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.