Merging forward updates from release/os/4.9 to release/os/4.10 - 2023-09-08

This commit is contained in:
r3-build 2023-09-08 14:56:56 +00:00
commit 17f5cd5524

View File

@ -771,7 +771,7 @@ class NodeVaultService(
private fun <T : ContractState> queryTotalStateCount(criteria: QueryCriteria, contractStateType: Class<out T>): Long {
val (criteriaQuery, criteriaParser) = buildCriteriaQuery<Long>(criteria, contractStateType, null)
criteriaQuery.select(criteriaBuilder.countDistinct(criteriaParser.vaultStates))
criteriaQuery.select(criteriaBuilder.count(criteriaParser.vaultStates))
val query = getSession().createQuery(criteriaQuery)
return query.singleResult
}