I have an entity which is associated to another via a One-to-Many relationship.
When i load the entity i want to load only the size of the associated collection(how many entities is this one associated with) & i want to do it in an EAGER way so that this is fetched at the time the base entity is fetched(in a single Query).
Hibernate count collection size without initializing shows how to do it in a Lazy way . I want to do it in eager way since i have some UI feature based on this and don't want to query multiple times.
Could use Formula but they are not HQL supporting.Any other way in hibernate?