Skip to content

Commit

Permalink
fix: static access of tracebleentity id
Browse files Browse the repository at this point in the history
  • Loading branch information
JordenReuter committed May 23, 2024
1 parent 571a104 commit 3beef86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public List<Permission> findByProductAndAppIdAndExcludePermissionsById(String pr
cq.where(cb.and(
cb.equal(root.get(Permission_.PRODUCT_NAME), productName),
cb.equal(root.get(Permission_.APP_ID), appId),
root.get(Permission_.ID).in(permissionIds).not()));
root.get(TraceableEntity_.ID).in(permissionIds).not()));
return this.getEntityManager().createQuery(cq).getResultList();
} catch (Exception ex) {
throw new DAOException(ErrorKeys.ERROR_FIND_BY_PRODUCT_AND_APP_ID, ex);
Expand All @@ -71,7 +71,7 @@ public List<Permission> findByProductNamesAndExcludePermissionsById(Collection<S
var cq = cb.createQuery(Permission.class);
var root = cq.from(Permission.class);
cq.where(cb.and(root.get(Permission_.PRODUCT_NAME).in(productNames),
root.get(Permission_.ID).in(permissionIds).not()));
root.get(TraceableEntity_.ID).in(permissionIds).not()));
return this.getEntityManager().createQuery(cq).getResultList();
} catch (Exception ex) {
throw new DAOException(ErrorKeys.ERROR_FIND_BY_PRODUCT_NAMES, ex);
Expand All @@ -83,7 +83,7 @@ public List<Permission> findAllExcludingGivenIds(Collection<String> permissionGu
var cb = this.getEntityManager().getCriteriaBuilder();
var cq = cb.createQuery(Permission.class);
var root = cq.from(Permission.class);
cq.where(root.get(Permission_.ID).in(permissionGuids).not());
cq.where(root.get(TraceableEntity_.ID).in(permissionGuids).not());
return this.getEntityManager().createQuery(cq).getResultList();
} catch (Exception ex) {
throw new DAOException(ErrorKeys.ERROR_FIND_NOT_BY_IDS, ex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ public class AssignmentService {
@Transactional
public void createAssignments(Role role, List<Assignment> assignments) {
dao.deleteByRoleId(role.getId());
// dao.selectByCriteria(role.id)
// reduce assignments by result
dao.create(assignments);
}

Expand Down

0 comments on commit 3beef86

Please sign in to comment.