So the actual nature of the issue here is that there is not and has never been any equivalent to the <load-collection/> result set mapping element available in annotations. In principle, the @Loader annotation should refer to a named query with a @CollectionResult, but the @CollectionResult annotation simply doesn’t exist, and be added without duplicating the whole @SqlResultSetMapping annotation. Nevertheless, I think I’ve found a workaround that lets you use a named query with a @ColumnResult or @EntityResult to load the collection. |