Im using CONCAT_WS within hibernate query,
to create a giant string and search by all fields using like '%value%'
. It works fine, but for some records some fields are null. e.g if actId
is null, my whole concat_ws returns null. I don't know why, concat_ws must ignore null values. May be it's because hibernate trying to call getActNumber from null? anyway I'm trying hard to resolve this problem.
where CONCAT_WS("_", actItemId.actId.actNumber, DATE_FORMAT(recordDate, '%d.%m.%Y'), actItemId.techniqueId.name, fzkActNumber, ....etc) like '%value%'
thanks!