diff --git a/src/Query.php b/src/Query.php index 0e19dd1..37b2178 100644 --- a/src/Query.php +++ b/src/Query.php @@ -454,7 +454,21 @@ public function assembleSelect() foreach ($resolved as $target) { $targetColumns = $resolved[$target]->getArrayCopy(); if (isset($omitted[$target])) { - $targetColumns = array_diff($targetColumns, $omitted[$target]->getArrayCopy()); + $targetColumns = array_udiff( + $targetColumns, + $omitted[$target]->getArrayCopy(), + function ($a, $b) { + if (! is_string($a)) { + return 1; + } + + if (! is_string($b)) { + return -1; + } + + return strcmp($a, $b); + } + ); } if (! empty($customAliases)) {