Merge pull request #7495 from corda/merge-release/os/4.10-release/os/4.11-2023-09-08-3

ENT-10756 Merging release/os/4.10 to release/os/4.11
This commit is contained in:
Rick Parker 2023-09-11 09:41:54 +01:00 committed by GitHub
commit a90e0b4cfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -787,7 +787,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
}