Currently, org.hibernate.annotations.FetchMode FetchMode.SUBSELECT is only supported for @ManyToOne or @OneToOne relations, as per the implementation in org.hibernate.cfg.AnnotationBinder (see the error message there for SUBSELECT)
It would still be useful to implement this - we have cases where we don't want to overload our legacy DB with this join (the subselect join would be more efficient) but the regular SELECT fetch would be too expensive.
If someone is able to pick it up, that would be great. But if you were able to provide pointers on how to implement such a functionality (e.g. tests to look at, key classes to understand), I can give it a shot
org.hibernate.FetchMode
|