greendao 多表查询

QueryBuilder queryBuilder = userDao.queryBuilder();
queryBuilder.join(Address.class, AddressDao.Properties.userId)
  .where(AddressDao.Properties.Street.eq("Sesame Street"));
List users = queryBuilder.list();

 

QueryBuilder<目标表bean> queryBuilder = 目标表Dao.queryBuilder();
queryBuilder.join(已知表, 已知表和已知表的外键)
        .where(已知表的已知字段=“xxx”);
List users = queryBuilder.list();

官网原文url:http://greenrobot.org/greendao/documentation/joins/

 

你可能感兴趣的:(greenDao,android)