How to fetch entity by `Int` when a `Key` is expected in the Haskell persistent library?

后端 未结 1 2011
刺人心
刺人心 2021-02-20 05:31

I use Persistent orm with scotty web framework.

I want to get value from db by id. These id are coming to me from GET request

There are \"get\" function that tak

1条回答
  •  半阙折子戏
    2021-02-20 05:41

    You can use toSqlKey for that.

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