I am new to SailsJs. I have a MySQL database with 123 tables with lots of fields. Now i want to use that database in my sails application. When i need to get data from any table i need to declare fields name, type etc in model like below
module.exports = {
tableName: 'Mytable',
adapter: 'someMysqlServer',
migrate: 'safe',
autoCreatedAt: false,
autoUpdatedAt: false,
attributes: {
id: {
type: 'number',
required:true
},
name: {
type: 'string',
required: true
}
}
};
Now I don't want to declare all the fields in model as i have so many tables/fields. So how can i select/insert/update data without this.