samedi 19 mars 2016

Sequelize - Limit attributes when inserting to sqlite database

My issue has come up when I am inserting into a table in a SQLite database using a Sequelize model. I have a table with 4 columns: id, name, type, and description. I have a talks model which has the above schema and I can send a request to get them easily by doing talks.findAll({attributes: [ <columns> ]});, but I have been having an issue when trying to insert a row into the database. It complains because it defaults to inserting with the createdAt and updatedAt columnns, although I do not have those in the table. Is there a similar functionality when using model.create()?

Aucun commentaire:

Enregistrer un commentaire