I have the (working) following code:
val actions = (for {
_ <- slickUsers.insertOrUpdate(dbUser)
loginInfo <- loginInfoAction
_ <- slickUserLoginInfos += DBUserLoginInfo(dbUser.userID, loginInfo.id.get)
} yield ()).transactionally
with loginInfoAction being a DBIOAction. I would like to change loginInfoActions to a Seq of DBIOAction and for each of them, execute the same DBUserLoginInfo action afterwards.
I tried this stupidly:
val actions = (for {
_ <- slickUsers.insertOrUpdate(dbUser)
loginInfoAction <- loginInfoActions
loginInfo <- loginInfoAction
_ <- slickUserLoginInfos += DBUserLoginInfo(dbUser.userID, loginInfo.id.get)
} yield ()).transactionally
But it does not work as expected (I would have though loginInfoAction would iterate over the Seq of DBIOAction). I am a newbie in Slick so do not hesitate to point me to the documentation if I missed anything !