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

Extract join values to merge as an original type #16635

Closed
wants to merge 2 commits into from

Conversation

adorechic
Copy link

ActiveRecord::QueryMethods#joins! receives arguments as variable
length arguments. So that it saves join values as Array.

This affects ActiveRecord::Relation::Merger#merge_joins which
handles joins by its type. If String joins merged twice, the second
merge process raises ActiveRecord::ConfigurationError

Takamichi Yoshikawa and others added 2 commits August 22, 2014 20:33
```ActiveRecord::QueryMethods#joins!``` receives arguments as variable
length arguments. So that it saves join values as Array.

This affects ```ActiveRecord::Relation::Merger#merge_joins``` which
handles joins by its type. If String joins merged twice, the second
merge process raises ```ActiveRecord::ConfigurationError```
@adorechic
Copy link
Author

@cristianbica oops, thanks. I got it.

@thedarkone
Copy link
Contributor

This will be fixed when #15461 is merged (#15488 is also related).

@adorechic
Copy link
Author

@thedarkone thanks, I close this Pull Request.

@adorechic adorechic closed this Aug 25, 2014
thedarkone added a commit to thedarkone/rails that referenced this pull request Sep 12, 2014
JOIN clauses order is important, previous implementation always
put string or arel joins at then end (after auto-generated
association joins).

Fixes rails#12953, rails#15488, rails#16635.
thedarkone pushed a commit to thedarkone/rails that referenced this pull request Sep 12, 2014
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.

None yet

3 participants