- WIP on migration and some bug fixes linked to withJoin() select problems

This commit is contained in:
Dave Mc Nicoll committed 2025-05-15 18:05:23 +00:00
1 parent 761e0401b0
commit cc6048d4ee
20 files changed
+196 -93

No files matched your search

+6
View File
@@ -10,6 +10,12 @@ class Attribute
public static function handleArrayField(null|\Stringable|string|array $field, null|string|bool $alias = Repository::DEFAULT_ALIAS, string $separator = ', ') : mixed
{
if ( is_array($field) ) {
if (count($field) < 2) {
throw new \RuntimeException(
sprintf("Array field must be formed of at least two things, a class name, and a property. (received %s)", json_encode($field))
);
}
$class = array_shift($field);
$field[1] ??= $alias;