Class A has a one-to-many relationship with B Therefore, A has the collectionOfB attribute.
Is it possible to match “score B” with one attribute in A ?
The goal is to offer a shortcut to retrieve the number of associated B without loading the entire collection. Sometimes I only need an account, i.e. Collection size. I know that I can fulfill a request regarding an entity manager who does just that. However, seeing that the JPA provider did this, thanks to the comments, of course, would be preferable.
source share