Minor : fix populateOwners method to patch all fields of owners (#17272)

This commit is contained in:
sonika-shah 2024-08-02 14:52:45 +05:30 committed by GitHub
parent b5ea73ef47
commit 4bb6d7ec1c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1958,8 +1958,11 @@ public abstract class EntityRepository<T extends EntityInterface> {
if (nullOrEmpty(owners)) {
return;
}
// populate owner entityRefs with all fields
List<EntityReference> refs = validateOwners(owners);
owners = new ArrayList<>(refs);
for (int i = 0; i < owners.size(); i++) {
EntityUtil.copy(refs.get(i), owners.get(i));
}
}
@Transaction