DaanHoogland commented on code in PR #9721: URL: https://github.com/apache/cloudstack/pull/9721#discussion_r1774812867
########## engine/schema/src/main/java/com/cloud/vm/dao/UserVmDetailsDaoImpl.java: ########## @@ -22,13 +22,45 @@ import org.apache.cloudstack.resourcedetail.ResourceDetailsDaoBase; import com.cloud.vm.UserVmDetailVO; +import com.cloud.vm.VMInstanceVO; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import javax.inject.Inject; @Component public class UserVmDetailsDaoImpl extends ResourceDetailsDaoBase<UserVmDetailVO> implements UserVmDetailsDao { + @Inject + protected UserVmDetailsDao _detailsDao; + @Override public void addDetail(long resourceId, String key, String value, boolean display) { super.addDetail(new UserVmDetailVO(resourceId, key, value, display)); } + @Override + public void saveDetails(VMInstanceVO vm) { + saveDetails(vm, new ArrayList<String>()); + } + + @Override + public void saveDetails(VMInstanceVO vm, List<String> hiddenDetails) { Review Comment: Yes @BartJM , that would definitely make sense. It deduplicates code. But as the code uses the `VMInstanceVO` to get the `vm.id`, it could create a cyclic dependency. I don't think it is much effort so if you could give it a short try, that would be much appreciated. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org