How to query a column which value is null in JPA?
Just change your query to
@NamedQuery(name = "Concept.findByRefTableNull", query = "SELECT c FROM Concept c WHERE c.conceptName = :conceptName and c.refTable IS NULL"),
I'm not sure if this is a Spring Data JPA feature only but I just write a method in the repository interface of the form findByFieldName(Type field) where fieldName is the name of the column I need to do a null check on. I then use this method and pass null as a parameter.