/** * Expands the query to another entity type by using a JOIN. The given sourceProperty is used to * match the primary key property of the given destinationEntity. */ public <J> Join<T, J> join(Property sourceProperty, Class<J> destinationEntityClass) { AbstractDao<J, ?> destinationDao = (AbstractDao<J, ?>) dao.getSession().getDao(destinationEntityClass); Property destinationProperty = destinationDao.getPkProperty(); return addJoin(tablePrefix, sourceProperty, destinationDao, destinationProperty); }
/** * Expands the query to another entity type by using a JOIN. The primary key property of the * primary entity for this QueryBuilder is used to match the given destinationProperty. */ public <J> Join<T, J> join(Class<J> destinationEntityClass, Property destinationProperty) { return join(dao.getPkProperty(), destinationEntityClass, destinationProperty); }