【发布时间】:2015-03-26 08:14:12
【问题描述】:
考虑这个查询:
@Query("select c from Contact c "
+ " join fetch c.abonnements ab ")
Set<Contact > findServiceNotifContactFtech();
如何在 join 子句中从集合 abonnements 中获取两个或一个属性,因为使用 fetch c.abonnements hibernate 获取我所有的属性,我得到了 abonnements 类型的 30 个属性
【问题讨论】:
标签: java spring hibernate jpa spring-data