Added check so that keywords not can be empty and cause an NPE.
This commit is contained in:
parent
acea2a7211
commit
8bb0d7181a
@ -122,13 +122,15 @@ public class SupervisorDaoJPAImp extends QueryableDaoJPAImp<Employee, Supervisor
|
||||
}
|
||||
|
||||
public QuerySet keywords(Collection<Keyword> keywords) {
|
||||
if (keywords != null) {
|
||||
if (keywords != null && !keywords.isEmpty()) {
|
||||
getQuery().combine(
|
||||
new Query().join("_.keywords.keywords k").where("k in (:keywords)").parameter(
|
||||
"keywords", keywords)).distinct();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public QuerySet keyword(Keyword keyword) {
|
||||
if (keyword != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user