From d656c5da80ba9f8b4c2a6321cda63239c64e048f Mon Sep 17 00:00:00 2001 From: Jarold Wong Date: Wed, 13 Mar 2024 14:52:44 -0700 Subject: [PATCH] compare entities by id --- .../edu/ucdavis/dss/ipa/services/jpa/JpaUserRoleService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/edu/ucdavis/dss/ipa/services/jpa/JpaUserRoleService.java b/src/main/java/edu/ucdavis/dss/ipa/services/jpa/JpaUserRoleService.java index 72a38d12..32026421 100644 --- a/src/main/java/edu/ucdavis/dss/ipa/services/jpa/JpaUserRoleService.java +++ b/src/main/java/edu/ucdavis/dss/ipa/services/jpa/JpaUserRoleService.java @@ -71,7 +71,7 @@ public List findByLoginIdAndWorkgroup(String loginId, Workgroup workgr List workgroupUserRoles = new ArrayList(); for( UserRole userRole : user.getUserRoles() ) { - if ( userRole.getWorkgroup() != null && userRole.getWorkgroup().equals(workgroup) ) { + if ( userRole.getWorkgroup() != null && userRole.getWorkgroup().getId() == workgroup.getId() ) { workgroupUserRoles.add(userRole); } }