# How to update multiple rows?
- Specify the query condition using the collection's Query class, ex:
LotteryQuery - Compose the update using the collection's Update class, ex:
LotteryUpdate - Use the collection's Writer api
updateMultipassing the query & update.
val lotteryQry = LotteryQuery().lotteryName.is("lotto-1")
val lotteryUpd = LotteryUpdate().open.set(false)
LotteryWriter().updateMulti(lotteryQry, lotteryUpd)
REFERENCE