From fad4022cd5323d16099c41503aa2deef498b38f7 Mon Sep 17 00:00:00 2001 From: Peter Hormanns Date: Tue, 3 Dec 2019 18:57:51 +0100 Subject: [PATCH] fix oql syntax --- .../de/hsadmin/autoconfig/AutoconfigAutodiscoverServlet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hsarback/src/de/hsadmin/autoconfig/AutoconfigAutodiscoverServlet.java b/hsarback/src/de/hsadmin/autoconfig/AutoconfigAutodiscoverServlet.java index 349ea80..4f0d3b0 100644 --- a/hsarback/src/de/hsadmin/autoconfig/AutoconfigAutodiscoverServlet.java +++ b/hsarback/src/de/hsadmin/autoconfig/AutoconfigAutodiscoverServlet.java @@ -51,7 +51,7 @@ public class AutoconfigAutodiscoverServlet extends HttpServlet { final String domain = addrParts[1]; final Transaction transaction = new Transaction("autoconfig"); final EntityManager em = transaction.getEntityManager(); - final Query emailQuery = em.createQuery("SELECT addr FROM EMailAddresses addr WHERE addr.localpart = :localpart AND addr.domain = :domain AND ( addr.subdomain IS NULL OR addr.subdomain = :subdomain)"); + final Query emailQuery = em.createQuery("SELECT addr FROM EMailAddresses addr WHERE addr.localpart = :localpart AND addr.domain.name = :domain AND ( addr.subdomain IS NULL OR addr.subdomain = :subdomain)"); emailQuery.setParameter("subdomain", ""); emailQuery.setParameter("domain", domain); emailQuery.setParameter("localpart", localpart);