hibernate - Populate OneToMany relationship in Criteria -
i have entity auditlog holds one-to-many relationship auditparameter:
@entity public class auditlog implements iauditlog, serializable { // ... @onetomany(targetentity = auditparameter.class, mappedby = "auditlog") private list<iauditparameter> parameters; }
the auditparameter of cause has @manytoone(targetentity = auditlog.class) private iauditlog auditlog
.
i fetch auditlog records relationship list fetched. tried following:
session session = ((entitymanagerimpl)em.getdelegate()).getsession(); criteria audits = session.createcriteria(auditlog.class) .setfetchmode("parameters", fetchmode.join);
but generates left outer join
. can explain why generates outer join , how accomplish eagerly load auditparameters parameters collection?
Comments
Post a Comment