Mapped projection with <> to a case class with companion object in Slick

后端 未结 4 863
野趣味
野趣味 2021-02-10 00:30

With Slick, I am trying to project database table entries directly to the case class they represent. Following the example in the documentation, I set up a mapped projection usi

4条回答
  •  半阙折子戏
    2021-02-10 00:47

    The fix is quite simple:

    def * = id ~ entity1 ~ entity2 <> (SomeEntity3.apply _, SomeEntity3.unapply _)
    

提交回复
热议问题