Permalink
Browse files

- Corrected exists query in UserDao

  • Loading branch information...
1 parent 799bcf9 commit 57e935bef3b1cf285080570ce314da92bec79a22 @alexbiehl alexbiehl committed Mar 23, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/org/fhw/asta/kasse/server/dao/UserDao.java
@@ -30,7 +30,7 @@ public Person mapRow(ResultSet arg0, int arg1) throws SQLException {
}
public boolean exists(String ldapName) {
- final int res = template.queryForInt("SELECT COUNT(ldap_name) FROM person WHERE ldap_name = ?", new Object[]{ldapName});
+ final int res = template.queryForInt("SELECT COUNT(0) FROM person WHERE ldap_name = ?", new Object[]{ ldapName });
return res > 0;
}
public Optional<Person> getPersonById(final String ldapName) {

0 comments on commit 57e935b

Please sign in to comment.