laravel-nova-uuid-support icon indicating copy to clipboard operation
laravel-nova-uuid-support copied to clipboard

Search still broken in latest Nova with UUID

Open LiamKarlMitchell opened this issue 1 year ago • 1 comments

Also if I type a single character such as f it will error something to do with an aggregate search.

If I edit the Search/PrimaryKey 's invoke method to put a cast it works. But how to apply such a modification to Nova?

$cast = '';
if ($connectionType === 'pgsql' && $model->getKeyType() === 'uuid') {
    $cast = '::text';
}
return $query->{$whereOperator}($model->getQualifiedKeyName().$cast, $search);

LiamKarlMitchell avatar Aug 05 '22 19:08 LiamKarlMitchell