如何查询JPA中哪个值为空的列?
我正在使用JPA namedQuery从DB中选择数据。
@NamedQuery(name = "Concept.findByRefTableNull", query = "SELECT c FROM Concept c WHERE c.conceptName = :conceptName and c.refTable = :refTable"),
///
List<Concept> attributeList
= em.createNamedQuery("Concept.findByRefTableNull")
.setParameter("conceptName", "student").
setParameter("refTable", null).
getResultList();
System.out.println(attributeList.size()); //return 0
列表大小为 0,但我相信它应该有记录。原因是 refTable。如何查询JPA中哪个值为空的列?
谢谢。