diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 740645c8c8e..a13af375542 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -443,13 +443,19 @@ abstract class CommonObject public $next_prev_filter; + /** + * @var array List of child tables. To test if we can delete object. + */ + protected $childtables = array(); + /** * @var array List of child tables. To know object to delete on cascade. - * if name like with @ClassNAme:FilePathClass;ParentFkFieldName' it will - * call method deleteByParentField(parentId,ParentFkFieldName) to fetch and delete child object + * If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will + * call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object */ protected $childtablesoncascade = array(); + // No constructor as it is an abstract class /** * Check an object id/ref exists diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 03fffaaba5d..9a15aa59836 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -196,7 +196,9 @@ class MyObject extends CommonObject //protected $childtables = array(); /** - * @var array List of child tables. To know object to delete on cascade. + * @var array List of child tables. To know object to delete on cascade. + * If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will + * call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object */ //protected $childtablesoncascade = array('mymodule_myobjectdet');