Skip to content

bulkCreate does not populate dataValues correctly #9274

Closed

Description

@kaxelson

What are you doing?

When calling bulkCreate:

What do you expect to happen?

I expect it to populate the dataValues like save does:

values[attr] = values[this.constructor.rawAttributes[attr].field];

What is actually happening?

bulkCreate incorrectly invokes the set function when populating the model's dataValues:

instance.set(attr, instance.dataValues[this.rawAttributes[attr].field]);

Note : Your issue may be ignored OR closed by maintainers if it's not tested against latest version OR does not follow issue template.

Activity

  1. sushantdhiman commented on Apr 7, 2018

    @sushantdhiman
    Contributor

    @sequelize/orm anyone remember why we do that for bulkCreate

  2. janmeier commented on Apr 9, 2018

    @janmeier
    Member

    Nope, I don't recall why we would want to do that

  3. stale commented on Jul 8, 2018

    @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 🙂

  4. sushantdhiman commented on Aug 15, 2018

    @sushantdhiman
    Contributor

    Fixed by #9797

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions