From b9866008b293cbc9b050ffb02f485fb2a558c438 Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Wed, 19 Jul 2017 12:53:38 +0000 Subject: [PATCH] Impact analysis: better error report if the data model defines redundancy on a unidirectional relation (make it easier to troubleshoot for consultants) SVN:trunk[4840] --- core/relationgraph.class.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/relationgraph.class.inc.php b/core/relationgraph.class.inc.php index 54ded174e..14995ec0e 100644 --- a/core/relationgraph.class.inc.php +++ b/core/relationgraph.class.inc.php @@ -457,6 +457,10 @@ class RelationGraph extends SimpleGraph { // Get the upper neighbours $sQuery = $aQueryInfo['sQueryUp']; + if (!$sQuery) + { + throw new Exception("Redundancy cannot be enabled on the relation $sRelCode/{$aQueryInfo['sDefinedInClass']}/{$aQueryInfo['sNeighbour']}: its direction is \"{$aQueryInfo['sDirection']}\""); + } try { $oFlt = static::MakeSearch($sQuery);