winterhazel commented on code in PR #9888:
URL: https://github.com/apache/cloudstack/pull/9888#discussion_r1956558888


##########
usage/src/main/java/com/cloud/usage/UsageManagerImpl.java:
##########
@@ -1544,7 +1544,7 @@ private void createVolumeHelperEvent(UsageEventVO event) {
             //For volumes which are 'attached' successfully, set the 'deleted' 
column in the usage_storage table,
             //so that the secondary storage should stop accounting and only 
primary will be accounted.
             SearchCriteria<UsageStorageVO> sc = 
_usageStorageDao.createSearchCriteria();
-            sc.addAnd("id", SearchCriteria.Op.EQ, volId);
+            sc.addAnd("entityId", SearchCriteria.Op.EQ, volId);

Review Comment:
   This code should be extracted to the DAO layer and use `SearchBuilder` 
instead, which would remove the necessity of having a constant. Hence, I don't 
think that its worth to create constants for a code using something deprecated 
and that may be refactored soon.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to