Thanks for wanting to report an issue you've found in Sequelize. Please delete this text and fill in the template below. If unsure about something, just do as best as you're able.
Note that it will be much easier for us to fix the issue if a test case that reproduces the problem is provided. Ideally this test case should not have any external dependencies. We understand that it is not always possible to reduce your code to a small test case, but we would appreciate to have as much data as possible. Thank you!
Github should only be used for feature requests and bugs - all questions belong on StackOverflow, Slack, or Google groups.
This template is for submitting issues - if you want to submit a feature request you may skip this template
What you are doing?
Post a minimal code sample that reproduces the issue, including models and associations
console.log(instance.dataValues, instance.toJSON(), Model.build(instance.toJSON()));
What do you expect to happen?
The fields should be identical in all 3 cases. The instance is a freshly selected row out of the database. No updates have occurred.
What is actually happening?
After passing instance.toJSON() into Model.build, the new returned instance does not contain createdAt or updatedAt timestamps. I am manually adding these stamps, and am not using the timestamps option.
Dialect: postgres
Database version: 9
Sequelize version: 3.30
Thanks for wanting to report an issue you've found in Sequelize. Please delete this text and fill in the template below. If unsure about something, just do as best as you're able.
Note that it will be much easier for us to fix the issue if a test case that reproduces the problem is provided. Ideally this test case should not have any external dependencies. We understand that it is not always possible to reduce your code to a small test case, but we would appreciate to have as much data as possible. Thank you!
Github should only be used for feature requests and bugs - all questions belong on StackOverflow, Slack, or Google groups.
This template is for submitting issues - if you want to submit a feature request you may skip this template
What you are doing?
Post a minimal code sample that reproduces the issue, including models and associations
What do you expect to happen?
The fields should be identical in all 3 cases. The instance is a freshly selected row out of the database. No updates have occurred.
What is actually happening?
After passing
instance.toJSON()intoModel.build, the new returned instance does not containcreatedAtorupdatedAttimestamps. I am manually adding these stamps, and am not using thetimestampsoption.Dialect: postgres
Database version: 9
Sequelize version: 3.30