Skip to content
This repository was archived by the owner on Nov 12, 2019. It is now read-only.
This repository was archived by the owner on Nov 12, 2019. It is now read-only.

Regression in polymorphic associations #37

@rzane

Description

@rzane

This issue only affects Active Record 5.2.

In Active Record < 5.2, polymorphic joins will include a condition on the _type column.

LEFT OUTER JOIN "people"
ON "people"."id" = "notes"."notable_id" AND "notes"."notable_type" = 'Person'

In Active Record 5.2, the condition will not be included:

LEFT OUTER JOIN "people"
ON "people"."id" = "notes"."notable_id"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions