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

Use Group clause in ExportLensActionRequest to allow for aggregate Lens exports #127

Merged
merged 3 commits into from
Oct 11, 2021

Conversation

matthewjumpsoffbuildings
Copy link
Contributor

As per issue #90 - when using an export query that is not forAllMatchingResources, the default behaviour was to use the Laravel withKey which selects the primary key (usually id) of the Resource in question, disregarded the key of the Lens for that resource (which may be an aggregate lens using COUNT() and GROUP BY SQL)

The solution is to check for a groups clause in the Lenses underlying query builder, and if it exists, to use that with a whereIn() instead

@patrickbrouwers patrickbrouwers merged commit 3641b8b into SpartnerNL:1.2 Oct 11, 2021
@patrickbrouwers
Copy link
Member

Thanks @matthewjumpsoffbuildings

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 this pull request may close these issues.

2 participants