I have the following query:
SELECT p FROM dbEntity p where p.name like %:nameFilter%
nameFilter is default an empty String (""), it can also be set to a string the user can enter.
Now the default case gets all rows where the name column is either filled with text or is set to an empty string.
However, there are also rows where name is set to NULL.
How can I change my query to also return the rows with NULL, but only if nameFilter is an empty String?