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'
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'