Skip to content

Behaviour of alias (as) to foreignKey translations in associations should be synchronized. #5267

Closed

Description

@rmzg

Right now the various associations (hasOne, belongsTo, hasMany, etc) treat aliases differently when attempting to create implicit, not defined, foreignKey names. This behaviour should be made consistent across all the different associations, either by using the alias as the foreignkey or not using it or by requiring an explicit foreignKey definition when using an alias as part of an association definition.

Activity

  1. added
    breaking change
    on Jan 20, 2016
  2. added this to the 4.0 milestone on Jan 20, 2016
  3. overlookmotel commented on Jun 20, 2016

    @overlookmotel
    Contributor

    @mickhansen @janmeier @sushantdhiman Could one of you re-open this issue so we can discuss whether to change the keys created by belongsToMany() to use as or not?

  4. removed this from the 4.0 milestone on Jun 8, 2017
  5. stale commented on Aug 12, 2017

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changestale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions