Scala projections in Slick for only one column

后端 未结 1 740
一个人的身影
一个人的身影 2021-01-17 19:09

I\'m following the Slick documentation example for autoincrementing fields and I\'m having trouble creating a mapped projection that ... well, only has one column.



        
1条回答
  •  清歌不尽
    2021-01-17 19:31

    This is a known issue with Slick; mapped projections do not work with a single column. See https://github.com/slick/slick/issues/40

    Luckily, you don't need a mapped projection for your code to work. Just omit everything after and including the <>. See scala slick method I can not understand so far for a great explanation of projections. It includes the information you need to get going.

    0 讨论(0)
提交回复
热议问题