admin管理员组文章数量:1122846
Suppose I have entities:
@Entity
class User {
id
name
List<Address> addresses;
}
and
@Entity
class Address {
id
street
}
I need to do search based on user.name and address.stree I have entity view like:
@EntityView(User.class)
interface UserView {
Long getId()
String getName()
List<AdressView> getAdresses()
interface AddressView { ... }
}
I am using CriteriaBuilder for searching with implicit joins like:
criteriaBuilder.where("name").eq(name)
and
criteriaBuilder.whereExists() for adresses.
But what feature of blaze persistence framework should I use to correctly search for related addresses and to have all the adresses related to the user being returned in the UserView.getAddresses() ?
本文标签: hibernateblaze persistence complex searchsuggested approachStack Overflow
版权声明:本文标题:hibernate - blaze persistence complex search - suggested approach - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736308494a1933682.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论