/**
  * 
  */
 public function delete($pb_delete_related = false, $pa_options = null, $pa_fields = null, $pa_table_list = null)
 {
     $t_left = $this->getAppDatamodel()->getInstanceByTableNum($this->getLeftTableNum());
     $vn_left_id = $this->get($this->getLeftTableFieldName());
     $vn_right_id = $this->get($this->getRightTableFieldName());
     $t_right = $this->getAppDatamodel()->getInstanceByTableNum($this->getRightTableNum());
     if ($vn_rc = parent::delete($pb_delete_related, $pa_options, $pa_fields, $pa_table_list)) {
         foreach (array($this->getRightTableName() => $t_left, $this->getLeftTableName() => $t_right) as $vs_other_table_name => $t_instance) {
             if ((bool) $t_instance->getProperty('SUPPORTS_ACL_INHERITANCE')) {
                 if (is_array($va_inheritors = $t_instance->getProperty('ACL_INHERITANCE_LIST')) && in_array($vs_other_table_name, $va_inheritors)) {
                     ca_acl::applyACLInheritanceToRelatedRowFromRow($t_instance, $vs_other_table_name == $this->getLeftTableName() ? $vn_right_id : $vn_left_id, $vs_other_table_name, $vs_other_table_name == $this->getLeftTableName() ? $vn_left_id : $vn_right_id, array('deleteACLOnly' => true));
                 }
             }
         }
     }
     return $vn_rc;
 }