Skip to content

Commit 4191b0d

Browse files
authored
MONGOID-5237 Add Feature Flag: _matches? should use millisecond precision when comparing Time objects (#5149)
* MONGOID-5237 put feature flag in the code * MONGOID-5237 add docs and config tests * MONGOID-5237 fix comment * MONGOID-5237 refactor tests * MONGOID-5237 update docs again
1 parent 5ae6a08 commit 4191b0d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

source/reference/configuration.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,13 @@ for details on driver options.
260260
# error. (default: true)
261261
belongs_to_required_by_default: true
262262

263+
# In Mongoid 7.3 and earlier, embedded matching performed time comparisons
264+
# with full (microsecond) precision. However, MongoDB server is only
265+
# capable of storing times with millisecond precision. Enabling this
266+
# option makes Mongoid truncate times to millisecond precision for
267+
# comparison purposes, to match the server behavior. (default: false)
268+
compare_time_by_ms: false
269+
263270
# Set the global discriminator key. (default: "_type")
264271
discriminator_key: "_type"
265272

0 commit comments

Comments
 (0)