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

Fix issue that caused certain uses of select to break #114

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aparkerdavid
Copy link

@aparkerdavid aparkerdavid commented Jan 14, 2025

Depending on the shape of your query, Ecto may run it as a subquery when using aggregate functions. Ecto has rules for select clauses in subqueries that do not apply to queries run normally. Because Scrivener does an aggregate by count, it chokes on certain queries that Ecto wants to convert to subqueries but can't. This change addresses the issue by always ignoring select clauses when aggregating.

Ecto issue for reference: https://github.com/elixir-ecto/ecto/issues/

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.

1 participant