File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

count(*) and groupby - Projections

 
JayaSiji Gopal
Ranch Hand
Posts: 303
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a query



I am trying to use Hibernate detached criteria and have the following code:



This generates the above query with count(*). What should i add to get the count(*) in the query?
I tried projectionsCriteria.setProjection(Projections.count("column1")); and
projectionsCriteria.setProjection(Projections.rowCount());

that does not work. Any ideas?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic