New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(paranoid): Revert paranoid to work like in v3 #9007
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks okay to me, if this is a big problem for many people, I accept this as a workaround. But I'm not really sure about the term 'simple', and the multi data type for the paranoid option, as it might be confusing for people and if someone checks for if(paranoid)
, 'simple' will also evaluate to true. This might be handy for some cases but I think there could also be others. Maybe we could add another option, which toggles 'legacy' mode?
Thanks for the review. I agree that the term I initially added this as a separate option, but found that I liked the shared option better. It also has a nice resemblance with the timestamps properties, where you can use a boolean or a string. Maybe the best option is to have a boolean value be the backwards compatible value, and encourage new users to use a string only, either |
Any chance for getting a review of this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I'd be fine with going for better query performance over semantic correctness.
I'd be open to going back to the old behaviour and releasing v5 now.
I guess we could also invert this and have the v4 logic be ‘legacy’. It would fix the issue with the simple terminology and have most users be on the default config. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, can you deprecate time-based
approach. Possibly give short reason for deprecation, then link to target issue
in v5 we can have simple way by default
Add an option, `legacy` to enable paranoid to work like in v4
I changed this PR now to restore the old functionality, with an option to use I have updated the docs, but it would be great if the maintainers could take care of any other communication required, as I think that would be much more efficient. |
What can I do to help move this PR forward? |
Any word on a version 5 release or when this code will be available to start using. |
@sushantdhiman Is working on v5 here, should be ready soon |
This fix is now included in v5 branch 014f2f5 |
Pull Request check-list
Please make sure to review and check all of these items:
npm run test
ornpm run test-DIALECT
pass with this change (including linting)?Description of change
We are currently upgrading to Sequelize v4. As many others we have run into issue #8496. I do not believe having this functionality is good in any way, and I think it was a mistake for make this the new default in v4. The problems around this is well explained in the linked issue.
This PR tries to move forward by reverting paranoid to work like in v3, with an option to have it work like v4. This will likely be a semver-major change to land in v5.
Closes #8496