infix fun <T> KProperty<T>.addToSet(expression: T): BsonField
(source)
Gets a field name for a $group operation representing all unique values that results from applying the given expression to each document in a group of documents that share the same group by key.
Parameters
Return
the field
Mongodb
.driver.manual reference/operator/aggregation/addToSet/ $addToSet