I would like to create an SQL statement like
> UPDATE table1 SET field1 = (SELECT field1 FROM table2 WHERE table2.field2=table1.field1 LIMIT 1)
So fill a field of a table with a computed value.
Is this possible in slick? I know updating with static fields like
> Table1.map(_.field1).update(value1)
But I didn't find a way to enter a query there.
If it is not possible in slick, what do you think about implementing it? I think it would be a nice feature to have something like
> Table1.update(Column[T1] => Column[T1])
which would allow me to write
> Table1.update{ entry1 =>
> Table2.filter(_.field2===entry1.field2)
> }