computed
Creates a projection of a property whose value is computed from the given expression. Projection with an expression can be used in the following contexts:
- $project aggregation pipeline stage.
- Starting from MongoDB 4.4, it's also accepted in various find-related methods within the {@code
MongoCollection}-based API where projection is supported, for example:
- {@code find()}
- {@code findOneAndReplace()}
- {@code findOneAndUpdate()}
- {@code findOneAndDelete()}
Return
the projection
Parameters
the expression
See also
#computedSearchMeta(String)
#project(Bson)
Creates a projection of a property whose value is computed from the given expression. Projection with an expression can be used in the following contexts:
- $project aggregation pipeline stage.
- Starting from MongoDB 4.4, it's also accepted in various find-related methods within the {@code
MongoCollection}-based API where projection is supported, for example:
- {@code find()}
- {@code findOneAndReplace()}
- {@code findOneAndUpdate()}
- {@code findOneAndDelete()}
Return
the projection
Parameters
the data class property
the expression
See also
#computedSearchMeta(String)
#project(Bson)
Creates a projection of a String whose value is computed from the given expression. Projection with an expression can be used in the following contexts:
- $project aggregation pipeline stage.
- Starting from MongoDB 4.4, it's also accepted in various find-related methods within the {@code
MongoCollection}-based API where projection is supported, for example:
- {@code find()}
- {@code findOneAndReplace()}
- {@code findOneAndUpdate()}
- {@code findOneAndDelete()}
Return
the projection
Parameters
the expression
See also
#computedSearchMeta(String)
#project(Bson)
Creates a projection of a String whose value is computed from the given expression. Projection with an expression can be used in the following contexts:
- $project aggregation pipeline stage.
- Starting from MongoDB 4.4, it's also accepted in various find-related methods within the {@code
MongoCollection}-based API where projection is supported, for example:
- {@code find()}
- {@code findOneAndReplace()}
- {@code findOneAndUpdate()}
- {@code findOneAndDelete()}
Return
the projection
Parameters
the data class property
the expression
See also
#computedSearchMeta(String)
#project(Bson)