Closed rsoeldner closed 5 years ago
Likely the instance receives a binary string. What the function receives may depend on the database engine. Try rewriting it as
fromPrimitivePersistValue d = case UUID.fromText (fromPrimitivePersistValue d) of
Just uuid -> DeviceId uuid
Nothing -> error "not able to parse"
Using the groundhog-postgresql backend and struggle with this setup, pattern matching
fromPrimitivePersistValue (PersistText d)
will fail and I do not understand why.