Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chained Joins not working as documented #963

Open
lsh-silpion opened this issue May 7, 2019 · 1 comment · May be fixed by #913
Open

Chained Joins not working as documented #963

lsh-silpion opened this issue May 7, 2019 · 1 comment · May be fixed by #913

Comments

@lsh-silpion
Copy link

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.

@lsh-silpion
Copy link
Author

There is even a pull request which fixes this: #913

Why don't you merge it and release a bug fixed version?

@jeffdgr8 jeffdgr8 linked a pull request May 19, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant