From 05c2270f3695972d34e14d04988024a5549b7f68 Mon Sep 17 00:00:00 2001 From: yuri Date: Mon, 3 Apr 2017 11:28:24 +0300 Subject: [PATCH] fix relationship manager not storing has children audited --- application/Espo/Core/Utils/EntityManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/Espo/Core/Utils/EntityManager.php b/application/Espo/Core/Utils/EntityManager.php index 791e0c8262..2356de4843 100644 --- a/application/Espo/Core/Utils/EntityManager.php +++ b/application/Espo/Core/Utils/EntityManager.php @@ -663,7 +663,7 @@ class EntityManager } if ( - $this->getMetadata()->get("entityDefs.{$entity}.links.{$link}.type") == 'hasMany' + in_array($this->getMetadata()->get("entityDefs.{$entity}.links.{$link}.type"), ['hasMany', 'hasChildren']) ) { if (array_key_exists('audited', $params)) { $audited = $params['audited']; @@ -680,7 +680,7 @@ class EntityManager } if ( - $this->getMetadata()->get("entityDefs.{$entityForeign}.links.{$linkForeign}.type") == 'hasMany' + in_array($this->getMetadata()->get("entityDefs.{$entityForeign}.links.{$linkForeign}.type"), ['hasMany', 'hasChildren']) ) { if (array_key_exists('auditedForeign', $params)) { $auditedForeign = $params['auditedForeign'];