Skip to content

Rails 6 RC2 joins / arel regression #36761

@glebm

Description

@glebm

We have a query that works with all versions of Rails from 4 to 6 RC1:

https://github.com/thredded/thredded/blob/c691be6c9b4b25dea291ea4cfe7ea9b0de773c89/app/models/thredded/messageboard.rb#L131-L138

In Rails 6.2 RC2 the very first join (joins(:topics)) is no longer produced (INNER JOIN "thredded_topics" ...), resulting in an invalid SQL query.

Originally reported in thredded/thredded#822.
This was reported for PostgreSQL, not sure if other databases are also affected.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions