From: Roland Haeder Date: Wed, 14 Oct 2015 11:52:08 +0000 (+0200) Subject: An enum cannot be compared with a string, the only way I know is to use a parameter X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=377ce1dcccccaeaa37187c8b17ae3ca89bd7214f;p=juser-activity-core.git An enum cannot be compared with a string, the only way I know is to use a parameter Signed-off-by:Roland Häder --- diff --git a/src/org/mxchange/jusercore/model/user/LoginUser.java b/src/org/mxchange/jusercore/model/user/LoginUser.java index 4995ee7..c6162dc 100644 --- a/src/org/mxchange/jusercore/model/user/LoginUser.java +++ b/src/org/mxchange/jusercore/model/user/LoginUser.java @@ -66,7 +66,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus; @NamedQuery (name = "AllEmailAddresses", query = "SELECT DISTINCT c.contactEmailAddress FROM contacts AS c ORDER BY c.contactId ASC"), @NamedQuery (name = "SearchUserName", query = "SELECT u FROM users AS u WHERE LOWER(u.userName) LIKE LOWER(:param)"), @NamedQuery (name = "SearchEmailAddress", query = "SELECT u FROM users AS u INNER JOIN contacts AS c ON u.userContact = c WHERE LOWER(c.contactEmailAddress) LIKE LOWER(:param)"), - @NamedQuery (name = "AllPublicUsers", query = "SELECT u FROM users AS u WHERE u.userAccountStatus LIKE 'CONFIRMED' AND u.userPublicProfile = TRUE") + @NamedQuery (name = "AllPublicUsers", query = "SELECT u FROM users AS u WHERE u.userAccountStatus = :CONFIRMED AND u.userPublicProfile = TRUE") } ) public class LoginUser implements User {