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

Assistance with totalcount and groupcount when using ProjectTo #410

Closed
statler opened this issue Jan 23, 2020 · 1 comment
Closed

Assistance with totalcount and groupcount when using ProjectTo #410

statler opened this issue Jan 23, 2020 · 1 comment

Comments

@statler
Copy link

statler commented Jan 23, 2020

Hi Aleksey

Further to my work on #367, I have hit a bit of a snag. Everything works well enough, but I need some advice on some of the members of the LoadResult object.

In my strategy, I run the query on the base object and get the Ids returned by that query. I then run the query again on the projection with the filter being on the Ids from the first query. My issue is with what happens with totalcount, and possibly groupcount.

If I have say, a data set of 115 items and a page size of 20, then my first query will only return 20 ids. As a consequence, the totalcount in my second query will be 20 items. I can get around this easily enough by copying the totalcount from the first query.

What about the groupcount and summary items - and in the case of groups, the IEnumerable in data. Are these going to cause me any issues?

Any ideas?

@AlekseyMartynov
Copy link
Contributor

Hello

I can get around this easily enough by copying the totalcount from the first query.

Correct.

What about the groupcount and summary items - and in the case of groups, the IEnumerable in data. Are these going to cause me any issues?

Group keys and summary items should not cause any issue since LoadResult doesn't use their names.

Group data should not require any additional processing besides the transformation kindly described by you in #338 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants