[Haskell-cafe] persistent sqlite: getting record by ID
rasen.dubi at gmail.com
Sat Sep 19 01:28:53 UTC 2015
I'm not a persistent user, but as far as I know persistent uses
typeclasses to select appropriate table. According to the yesod
book, it seems to be PersistEntity class, precisely it's
entityDef method (see source of getTableName function).
Hope this helps,
On Sat, Sep 19, 2015 at 1:05 AM, miro <miroslav.karpis at gmail.com> wrote:
> Please, can you help me with following?
> I’m trying to get a record from sqlite by id. I have found following peace of code,…but I’m missing the place that where can I specify the table I’m actually querying (like PersonId).
> get $ Key $ (PersistInt64 $ fromIntegral id)
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe