Skip to content
Snippets Groups Projects
Commit 6f3d7d0b authored by srosse's avatar srosse
Browse files

OO-438: fix an empty select ... in () in the query to update the subscribers...

OO-438: fix an empty  select ... in () in the query to update the subscribers if there isn't subscribers to update
parent 2a7dc6b7
No related branches found
No related tags found
No related merge requests found
...@@ -464,6 +464,10 @@ public class NotificationsManagerImpl extends NotificationsManager implements Us ...@@ -464,6 +464,10 @@ public class NotificationsManagerImpl extends NotificationsManager implements Us
} }
protected void updateSubscriberLatestEmail(List<Subscriber> subscribersToUpdate) { protected void updateSubscriberLatestEmail(List<Subscriber> subscribersToUpdate) {
if(subscribersToUpdate == null || subscribersToUpdate.isEmpty()) {
return;//nothing to do
}
StringBuilder q = new StringBuilder(); StringBuilder q = new StringBuilder();
q.append("select sub from ").append(SubscriberImpl.class.getName()).append(" sub ") q.append("select sub from ").append(SubscriberImpl.class.getName()).append(" sub ")
.append(" inner join fetch sub.publisher where sub.key in (:aKey)"); .append(" inner join fetch sub.publisher where sub.key in (:aKey)");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment