kmongo / org.litote.kmongo / addEachToSet

addEachToSet

fun <T> addEachToSet(property: KProperty<Iterable<T>?>, values: List<T>): Bson (source)

Creates an update that adds each of the given values to the array value of the property, unless the value is already present, in which case it does nothing

Parameters

property - the property

values - the values

Parameters

Return
the update

Mongodb
.driver.manual reference/operator/update/addToSet/ $addToSet