use of com.peterphi.std.guice.hibernate.webquery.impl.QRelation in project stdlib by petergeneric.
the class JPAJoin method join.
public JPAJoin join(final String relation) {
final QRelation rel = entity.getRelation(relation);
final JoinType joinType;
// For non-nullable non-collection joins, use an INNER join instead of a LEFT join
if (!rel.isNullable() && !rel.isCollection())
joinType = JoinType.INNER;
else
joinType = JoinType.LEFT;
final Join<Object, Object> join = root.join(relation, joinType);
return new JPAJoin(builder, rel, join, rel.isCollection());
}