balderdashy/sails
View on GitHub.create method storing undeclared attributes as data type value
Open
#6,923 opened on Dec 31, 2019
help wantedmongoormtry this out please
Description
Node version: v13.0.1 Sails version (sails): 1.2.3 ORM hook version (sails-hook-orm): ^2.1.1 Sockets hook version (sails-hook-sockets): ^2.0.0 Grunt hook version (sails-hook-grunt): ^4.0.0 Sails mongo version (sails-mongo): ^1.0.1
This is master model
module.exports = {
tableName: 'MASTER',
schema: true,
attributes: {
name: {
type: 'string',
required: true
},
description: {
type: 'string'
},
},
};
whenever i am not passing description column value in request then it is storing as empty string value like this:
{
name : 'Swift',
description : "",
};
But i don't want to store description value in database.i need help asap