diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 9f252879fda..9dba821c012 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7909,7 +7909,11 @@ abstract class CommonObject $this->errors[] = $childObject->error; break; } - } + } else { + $error++; + $this->errors[] = "You defined a cascade delete on an object $childObject but there is no method deleteByParentField for it"; + break; + } } else { $error++; $this->errors[] = 'Cannot include child class file ' .$filePath;