> Seems to me there´s a ON DELETE CASCADE option missing in the DB? Could you check, that output of SHOW CREATE TABLE AttributeValue is as folows? CREATE TABLE `AttributeValue` ( `object_id` int(10) unsigned default NULL, `attr_id` int(10) unsigned default NULL, `string_value` char(128) default NULL, `uint_value` int(10) unsigned default NULL, `float_value` float default NULL, UNIQUE KEY `object_id` (`object_id`,`attr_id`), CONSTRAINT `AttributeValue-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `RackObject` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB; -- Denis Ovsienko