Dog
name Text
race Text
getAllDogsR :: Handler Html
getAllDogsR = do
Dogs<- runDB $ selectList [] [Asc DogName]
defaultLayout
[whamlet|
<ul>
$forall Entity dogid dog <- Dogs
<li>
#{show $ unKey (dogid)}
|]
When I run this code I will get a list of all dog keys that are in my database
like this:
- PersistInt64 1
- PersistInt64 2
- PersistInt64 3
- PersistInt64 4
- etc
but what I actually want is to show the pure value of the key
like this:
- 1
- 2
- 3
- 4
- etc
My question is how can I achieve this.