Commit 7efcaf6b authored by michael.simon's avatar michael.simon
Browse files

usage of type() is hard

parent 30f0df4d
......@@ -136,8 +136,8 @@ public class JpaRegistryDao extends JpaBaseDao<RegistryEntity, Long> implements
@SuppressWarnings("unchecked")
@Override
public List<RegistryEntity> findAllExternalBySsn(String serviceShortName) {
return em.createQuery("select r from RegistryEntity r where r.service.shortName = :ssn and "
+ " TYPE(r.user.class) = :class")
return em.createQuery("select r from RegistryEntity r, UserEntity u where r.service.shortName = :ssn and "
+ "r.user = u and TYPE(u) = :class")
.setParameter("ssn", serviceShortName)
.setParameter("class", ExternalUserEntity.class)
.getResultList();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment