Skip to content

Commit

Permalink
WFLY-10546: spring-greeter user query supported by both EE7 and EE8
Browse files Browse the repository at this point in the history
  • Loading branch information
emmartins committed Jun 12, 2018
1 parent 6021da5 commit 256ddac
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -34,8 +34,8 @@ public class UserDaoImpl implements UserDao {
public User getForUsername(String username) {
try {
Query query = entityManager
.createQuery("select u from User u where u.username = ?");
query.setParameter(1, username);
.createQuery("select u from User u where u.username = :username");
query.setParameter("username", username);
return (User) query.getSingleResult();
} catch (NoResultException e) {
return null;
Expand Down

0 comments on commit 256ddac

Please sign in to comment.