I have a table that I need to update, and I would like to do it in a batch. There are two fields which need to be matched with a set of I'm getting from an external source:
val externalSet = List((1,2), (3,4)...etc
I have an entity like this
case class Entity( var id1:Int, var id2:Int)
and I want to update the entity table with the list from externalSet
val toUpdate = from(entities)(e=>
where (&(e.id1 * 1000 + e.id2) in externalSet.map(s=>s._1 * 1000 + s._2))
select(e)
).map(various changes)
entities.update(toUpdate)