yes, you understood it. ;-)
attrib.comb link to comp
if you delete comp
you must find a way to set the attr.comb to null or delete the attr
you can do this in the database if it supports
or by issuing the query with Hibernate.
Code:
ALTER TABLE examples.test
ADD CONSTRAINT test_test2_id_fkey FOREIGN KEY (test2_id)
REFERENCES examples.test2 (id) MATCH SIMPLE
ON UPDATE RESTRICT ON DELETE set null;
Code:
or
ALTER TABLE examples.test DROP CONSTRAINT test_test2_id_fkey;
ALTER TABLE examples.test
ADD CONSTRAINT test_test2_id_fkey FOREIGN KEY (test2_id)
REFERENCES examples.test2 (id) MATCH SIMPLE
ON UPDATE RESTRICT ON DELETE cascade;