use of org.greenrobot.greendao.AbstractDao in project greenDAO by greenrobot.
the class QueryBuilder method join.
/**
* 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);
}
Aggregations