HI,
I have an issue regarding the Projections.rowCount() function because this generates the following sql code in the back:
Code:
select count(*) from ...
How can I make the sql resulted to be something like:
Code:
select count(0) from ...
I'm referring to Criteria.example case, so I don't want to build manually the select count(0) by using hql, i'm simply using something like:
Code:
criteria.add(Example.create(filter)
I'm asking because select count(0) is much faster and uses way less memory than select count(*) on most of the databases.
Please be advised that I don't want to count by a specific property, e.g. I'm aware of
Code:
Projections.count(propertyName)
.
Is there any way so I can achive this behaviour?
Thank you.