Hi I have a User entity which has a many-to-many relation to the Group entity. After constructing the criteria and adding all the restriction I have a check whether or not to count all the records in the database ...if yes I change the projection. And after that I need to change back to the original projection, because if a set it to null or use ResultTransformer or whatever the result list is filled with a object array elements and inside that are the User and Group objects Object[]{User, Group}. But naturally I need the list to be filled with User objects and inside that a collection of Group objects.
|