Q: Hibernate eager loading not fetching all child rows Hibernate version 4.3.10
I have parent/child relationship as described in the example. There are occasions when we expect only one row to be returned when querying for Provider. In this case, we limit the criteria by calling setMaxResults method to 1.
Dump of SQL revealed that hibernate makes outer join calls which ends up returning more than one row, but because of limit set on criteria, only first child row is read from database. 
    @Entity
    @Table(name = "F_PROVIDER")
    public class Provider {
        @OneToMany(cascade = CascadeType.ALL, mappedBy = "provider", orphanRemoval = true, fetch = FetchType.EAGER)
        private final Set<CredentialFieldDefinition> credentialFieldDefinitionList;
}

@Entity
@Table(name = "F_CRED_FIELDS", uniqueConstraints = { @UniqueConstraint(columnNames = { "name", "provider_id" }) })
public class CredentialFieldDefinition {
@ManyToOne(targetEntity = Provider.class, optional = false)
    @JoinColumn(name = "PROVIDER_ID", nullable = false, unique = false)
    private Provider provider;
}

How do I convince to return me full child set when I am reading only row?

A: You can try using SUBSELECT fetch mode:
@OneToMany(cascade = CascadeType.ALL, mappedBy = "provider", orphanRemoval = true, fetch = FetchType.EAGER)
@Fetch(FetchMode.SUBSELECT)
private final Set<CredentialFieldDefinition> credentialFieldDefinitionList;

This way credentialFieldDefinitionList will be initialized in a separate query.
