Slick left/right/outer joins with Option

后端 未结 4 2224
一向
一向 2020-12-25 14:38

In the Slick examples there are a few examples of joining where one of the resulting columns can be nulls, as it can be the case when doing left, right, or outer joins. For

4条回答
  •  难免孤独
    2020-12-25 15:35

    In Slick 3.1.1, the correct answer would be simply (as mentioned in some comments):

    for {
      (c, s) <- coffees joinLeft suppliers on (_.supID === _.id)
    } yield (c, s)
    

提交回复
热议问题