Hibernate Child Collection Limited When Using Left Join in Criteria
问题 When using hibernate criteria just altering the join type affects the results of the child collections of the root domain class. For instance, having class Parent have a one-to-many relationship with class Child with the following data: Parent | id | Name | | 1 | Parent 1 | Child | id | parent_id | Name | | 1 | 1 | Child1 | | 2 | 1 | Child2 | Using the following hibernate criteria returns the 1 parent row, and accessing the child collection results in the two rows being returned: session