• Post Reply Bookmark Topic Watch Topic
  • New Topic

What I'm doing wrong with this Criteria?

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,
The relationship between Group and Contact is one to many.
I want to get the count of contacts that belongs to a group

But running the query, i got nothing.
Any ideas what I'm doing wrong?
Thanks.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>>Integer.class

This isn't the java.lang.Integer class you have mapped, is it?

I'd slow the query down. First, do the query without the projection, and see if you get anything back. If that works, then add the projection. If not, well, get that part to work!

Let us know how it goes.

-Cameron McKenzie
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!