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

Changed includes to joins so .select() can still be used #330

Closed
wants to merge 1 commit into from

Conversation

akuma12
Copy link

@akuma12 akuma12 commented Jun 21, 2016

I noticed that .select() cannot be used with a cancan loaded query, as .includes() actually renames the columns. If .includes() is changed to .joins(), you get the same result with the ability to use custom selects.

@akuma12 akuma12 changed the title Chnaged includes to joins so .select() can still be used Changed includes to joins so .select() can still be used Jun 21, 2016
@Senjai
Copy link
Member

Senjai commented Jun 23, 2016

You dont get the same result. This is a hard problem a lot of people are trying to tackle.

Using joins performs an inner join, and thus can't be used with queries or logic that expect something similar to an outer join.

@Senjai Senjai closed this Jun 23, 2016
@coorasse
Copy link
Member

You may want to contribute to this: #238

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.

3 participants