Hibernate AliasToBean with Collection
问题 I have a bi-directional one-to-many relationship defined between Parent and Child classes. I'm looking to execute a query such that I can return a single parent, and a subset of its children in a bean. public class Parent { private int id; private Set<Child> children = new HashSet<Child>(0); // other fields + getters and setters } public class Child { private Parent parent; private int age; // other fields + getters and setters } The output I'm looking to achieve is: public class