You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there supposed to be a difference between them? Looking at the code it seems that I could choose either one and it would do the same thing. Maybe one should be deprecated since they both seem to be doing the exact same thing?
The text was updated successfully, but these errors were encountered:
I agree with you @bschlenk this seems like duplicated functionality. They are evaluated very close together in the code:
// Allows an external caller to modify the data
// before it is evaluated
if (this.options.modifyFixtureDataFn) {
data = this.options.modifyFixtureDataFn(data, Model);
}
// Allows an external caller to do some transforms to the data
// before it is saved
if (this.options.transformFixtureDataFn) {
result = this.options.transformFixtureDataFn(data, Model);
}
The modifyFixtureDataFn seems like it should come after setters, associations, and such are applied.
Removing this would probably be a breaking change but we could at least mark one of them for depreciation and start raising a warning when one is used. Thoughts?
These two methods look like they are called one after the other, regardless of anything else:
https://github.com/domasx2/sequelize-fixtures/blob/master/lib/loader.js#L135-L143
Is there supposed to be a difference between them? Looking at the code it seems that I could choose either one and it would do the same thing. Maybe one should be deprecated since they both seem to be doing the exact same thing?
The text was updated successfully, but these errors were encountered: