querydsl upgrade

This commit is contained in:
Athou
2015-07-09 12:34:54 +02:00
parent 58c1650863
commit 35e02f9d98
12 changed files with 77 additions and 74 deletions

View File

@@ -25,11 +25,11 @@ public class UserRoleDAO extends GenericDAO<UserRole> {
}
public List<UserRole> findAll() {
return newQuery().from(role).leftJoin(role.user).fetch().distinct().list(role);
return query().selectFrom(role).leftJoin(role.user).fetchJoin().distinct().fetch();
}
public List<UserRole> findAll(User user) {
return newQuery().from(role).where(role.user.eq(user)).distinct().list(role);
return query().selectFrom(role).where(role.user.eq(user)).distinct().fetch();
}
public Set<Role> findRoles(User user) {