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

OO-511: add the distinct in the outbox query

parent d525cdf6
No related branches found
No related tags found
No related merge requests found
...@@ -365,7 +365,7 @@ public class MailManager extends BasicManager { ...@@ -365,7 +365,7 @@ public class MailManager extends BasicManager {
*/ */
public List<DBMail> getOutbox(Identity from, int firstResult, int maxResults) { public List<DBMail> getOutbox(Identity from, int firstResult, int maxResults) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("select mail from ").append(DBMailImpl.class.getName()).append(" mail") sb.append("select distinct(mail) from ").append(DBMailImpl.class.getName()).append(" mail")
.append(" inner join fetch mail.from fromRecipient") .append(" inner join fetch mail.from fromRecipient")
.append(" inner join fromRecipient.recipient fromRecipientIdentity") .append(" inner join fromRecipient.recipient fromRecipientIdentity")
.append(" inner join fetch mail.recipients recipient") .append(" inner join fetch mail.recipients recipient")
......
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