scrivener_ecto
scrivener_ecto copied to clipboard
Fix issue that caused certain uses of `select` to break
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/
@drewolson will you take a look at this?