ormlite 多表联合查询

ormlite 多表联合查询


QueryBuilder shopBrandQueryBuilder = shopBrandDao.queryBuilder();
QueryBuilder shopQueryBuilder = shopDao.queryBuilder(); Where shopBrandWhere = shopBrandQueryBuilder.where();
shopBrandWhere .eq(ShopBrand.SHOP_NO, shopNo); Where shopWhere = shopQueryBuilder.where();
shopWhere
.like(Shop.SHOP_CODE, "%" + serch + "%")
.or()
.like(Shop.SHOP_LNAME, "%" + serch + "%"); QueryBuilder resultQueryBuilder =
shopBrandQueryBuilder
.join(shopQueryBuilder);
shopBrands=resultQueryBuilder.query();
上一篇:MyBatis之三:多表联合查询


下一篇:[POJ1050]To the Max