Skip to content

The findByPk and findById methods should not add the 'id' field when the 'hasPrimaryKeys' property is set to false. #12

Description

@lcmuniz

The findByPk and findById methods should not add the 'id' field when the 'hasPrimaryKeys' property is set to false.

I think that line 415 of the model.js file should be

return self.options.hasPrimaryKeys ? self.build({ id: id }) : self.build();

This is because someone might want to set their own id field with a default value and not call it 'id'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions