From 91e783e96ff1626a7127df146ed32b5f3f16d74a Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Wed, 8 Mar 2023 22:52:13 +0000 Subject: [PATCH] fix bug with ILIKE/LIKE on UTF8 encoded field --- lib/App/Netdisco/DB/ResultSet/DeviceModule.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/App/Netdisco/DB/ResultSet/DeviceModule.pm b/lib/App/Netdisco/DB/ResultSet/DeviceModule.pm index 8a97c466..24514f2f 100644 --- a/lib/App/Netdisco/DB/ResultSet/DeviceModule.pm +++ b/lib/App/Netdisco/DB/ResultSet/DeviceModule.pm @@ -43,11 +43,11 @@ Can match the C field as a substring. =item model -Can match the C field as a substring. +Can match the C field as a substring (case sensitive). =item serial -Can match the C field as a substring. +Can match the C field as a substring (case sensitive). =item class @@ -86,11 +86,11 @@ sub search_by_field { : () ), ( $p->{model} - ? ( 'me.model' => { '-ilike' => "\%$p->{model}\%" } ) + ? ( 'me.model' => { '-like' => "\%$p->{model}\%" } ) : () ), ( $p->{serial} - ? ( 'me.serial' => { '-ilike' => "\%$p->{serial}\%" } ) + ? ( 'me.serial' => { '-like' => "\%$p->{serial}\%" } ) : () ),