Skip to content

updateOnDuplicate problem when set to true. #9288

Closed

Description

@antl3x

Looking the code of updateOnDuplicate looks like we can set an array of fields or a boolean . If we pass a boolean true, the bulkCreate tries to update the primary key field as well, trowing an SequelizeForeignKeyConstraintError SequelizeForeignKeyConstraintError: Cannot delete or update a parent row error.

Code: https://github.com/sequelize/sequelize/blob/66fb6b67a74c107bfaf72304db315bf600c37921/lib/model.js#L2348`

Activity

  1. sushantdhiman commented on Apr 11, 2018

    @sushantdhiman
    Contributor

    I will remove boolean support and just keep array option as docs say

  2. added
    breaking changeFor issues and PRs. Changes that break compatibility and require a major version increment.
    on Apr 11, 2018
  3. added this to the v5 milestone on Apr 11, 2018
  4. sushantdhiman commented on Apr 11, 2018

    @sushantdhiman
    Contributor

    Fixed by 8b937dd

  5. added a commit that references this issue on Dec 30, 2019
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 changeFor issues and PRs. Changes that break compatibility and require a major version increment.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions