I have some code that was doing the following in persistent < 2
:
(either (\_ -> 0) id).fromPersistValue.unKey.entityKey $ myEntity
How can I achieve the same functionality using persistent > 2
as keys
are now defined by individual Backends and as such there is no unKey
function? Is there still away to achieve these "Int representations" for MongoDB keys in newer versions of Persistent?