diff --git a/src/QueryParserCustomFields.php b/src/QueryParserCustomFields.php index c4702ee..57d6bf6 100755 --- a/src/QueryParserCustomFields.php +++ b/src/QueryParserCustomFields.php @@ -5,6 +5,7 @@ use Baka\Database\CustomFields\CustomFields; use Baka\Database\CustomFields\Modules; use Baka\Database\Model; +use Exception; /** * Base QueryParser. Parse GET request for a API to a array Phalcon Model find and FindFirst can intepret @@ -774,7 +775,7 @@ public static function parseRelationShips(string $relationships, &$results) : ar $newResults = []; - if (!($results instanceof Baka)) { + if (!($results instanceof Model)) { throw new Exception(_('Result needs to be a Baka Model')); }