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
{{ message }}
Repository navigation
deleted records can be queried in the same second #7204
should use database time rather than servers'
The server time may be inconsistent with the database time.
should use $gt rather than $gte
For all databases, the time accuracy of the database can only be guaranteed to seconds, so deleted records may be in the same seconds to be queried. To avoid this, the first query condition can not contain the current second, followed by all the time required to the database time.
This is more of a bug than the title suggests - despite my server and database both residing in the same timezone, deleted paranoid records are still returned by findAll for a full 8 hours after their deletedAt field is populated (the system is hosted on the west coast, currently 8 hours behind UTC). As op mentions in point #1, the deletedAt field should be populated with the database time for consistency.
I'll open a PR tomorrow to address this as well as issue #2 (should use $gt rather than $gte).
Activity
Fix for sequelize#7204 part 1 (see also sequelize#5880 & sequelize#5897)
Fix for sequelize#7204 part 2 (see also sequelize#5880 & sequelize#5897)
Fix for sequelize#7204 part 1 (see also sequelize#5880 & sequelize#5897)
Fix for sequelize#7204 part 2 (see also sequelize#5880 & sequelize#5897)
Wsiegenthaler commentedon Feb 25, 2017
This is more of a bug than the title suggests - despite my server and database both residing in the same timezone, deleted paranoid records are still returned by findAll for a full 8 hours after their deletedAt field is populated (the system is hosted on the west coast, currently 8 hours behind UTC). As op mentions in point #1, the deletedAt field should be populated with the database time for consistency.
I'll open a PR tomorrow to address this as well as issue #2 (should use $gt rather than $gte).
sushantdhiman commentedon Mar 10, 2017
Fixed 1f8348f