Cross fetch created on bi-directional One-to-many JPA / Hibernate query
问题 Here's the basic mapping: Client { @OneToMany(mappedBy="client",cascade=CascadeType.ALL, fetch=FetchType.EAGER) private Set<Group> groups = new HashSet<Group>(); } Group { @ManyToOne (cascade=CascadeType.ALL) private Client client = new Client(); } The problem I'm having is that when I query against Client, I'm getting a full client for each associated group. My queries are pretty simple and I've tried both criteria and HQL. Here's a sample criteria query: Criteria crit = getSession()