mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-25 16:42:34 +00:00
14294 fixed admin event expiration sql error
This commit is contained in:
committed by
Hynek Mlnařík
parent
7e5b45f999
commit
cc8567e9f4
@@ -276,7 +276,7 @@ public class JpaEventStoreProvider implements EventStoreProvider {
|
||||
CriteriaBuilder cb = em.getCriteriaBuilder();
|
||||
CriteriaQuery<RealmAttributeEntity> cr = cb.createQuery(RealmAttributeEntity.class);
|
||||
Root<RealmAttributeEntity> root = cr.from(RealmAttributeEntity.class);
|
||||
cr.select(root).where(cb.and(cb.equal(root.get("name"),RealmAttributes.ADMIN_EVENTS_EXPIRATION),cb.greaterThan(root.get("value"),Long.valueOf(0))));
|
||||
cr.select(root).where(cb.and(cb.equal(root.get("name"),RealmAttributes.ADMIN_EVENTS_EXPIRATION),cb.greaterThan(root.get("value").as(Long.class),Long.valueOf(0))));
|
||||
Map<Long, List<RealmAttributeEntity>> realms = em.createQuery(cr).getResultStream().collect(Collectors.groupingBy(attribute -> Long.valueOf(attribute.getValue())));
|
||||
|
||||
long current = Time.currentTimeMillis();
|
||||
|
||||
Reference in New Issue
Block a user