MongoDB request DSL • opensavvy.ktmongo.dsl.path • Field • unsafe
unsafe¶
Refers to a field child of the current field, with no compile-time safety.
Sometimes, we must refer to a field that we don't want to add in the DTO representation. For example, when writing complex aggregation queries that use intermediary fields that are removed before the data is sent to the server.
We recommend preferring the type-safe syntax when possible (see Field).
Example¶
See also¶
Field.Companion.unsafeSimilar, but for accessing a field of the root document.