-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Hi,
the documentation of chained joins given here: http://greenrobot.org/greendao/documentation/joins/ doesn't work as expected. The documentation says:
QueryBuilder<City> qb = cityDao.queryBuilder().where(Properties.Population.ge(1000000)); Join country = qb.join(Properties.CountryId, Country.class); Join continent = qb.join(country, CountryDao.Properties.ContinentId, Continent.class, ContinentDao.Properties.Id); continent.where(ContinentDao.Properties.Name.eq("Europe")); List<City> bigEuropeanCities = qb.list();
which in the case of qb.join(country, CountryDao.Properties.ContinentId, Continent.class, ContinentDao.Properties.Id); simply doesn't work because country is of type Join<T, J> but for the first parameter of this method call type Join<?, T> is required. So you could just use a new queryBuilder derived from CountryDao here, but that would not make much sense either.
Do you even test what you document? As far as I can tell from looking at your code, there is no way to make chained joins work in a way that would be useful.