KEYCLOAK-99 UI: Users query should support wildcard

This commit is contained in:
Stian Thorgersen 2013-11-14 17:13:06 +00:00
parent 10f48a1bda
commit 50d6d609b4

View file

@ -658,7 +658,7 @@ public class RealmAdapter implements RealmModel {
} else {
builder.append(" and ");
}
builder.append(attribute).append("='").append(entry.getValue()).append("'");
builder.append(attribute).append(" like lower('%").append(entry.getValue().toLowerCase()).append("%')");
}
TypedQuery<UserEntity> query = em.createQuery(builder.toString(), UserEntity.class);
List<UserEntity> results = query.getResultList();