diff --git a/src/Models/DynaModelTrait.php b/src/Models/DynaModelTrait.php index 12f6bf2..4457cd4 100644 --- a/src/Models/DynaModelTrait.php +++ b/src/Models/DynaModelTrait.php @@ -1000,6 +1000,8 @@ protected function attachRelationData($resultData, $childData, $fieldAlias, $rel */ protected function isSingleResult($resultData = null):bool { + $resultData = (array) $resultData; + return isset($resultData['id']) && (is_numeric($resultData['id']) || is_string($resultData['id'])); } /**