sureshanaparti commented on code in PR #10017:
URL: https://github.com/apache/cloudstack/pull/10017#discussion_r1871048325


##########
engine/schema/src/main/java/com/cloud/storage/dao/BucketDaoImpl.java:
##########
@@ -79,4 +98,21 @@ public List<BucketVO> searchByIds(Long[] ids) {
         sc.setParameters("idIN", ids);
         return search(sc, null, null, false);
     }
+
+    @Override
+    public Long countBucketsForAccount(long accountId) {
+        SearchCriteria<Long> sc = CountBucketsByAccount.create();
+        sc.setParameters(ACCOUNT_ID, accountId);
+        sc.setParameters(STATE, BucketVO.State.Destroyed);
+        return customSearch(sc, null).get(0);

Review Comment:
   any chance of custom search returning null here?



-- 
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

Reply via email to