documentFromEntity :: (PersistEntity record, PersistEntityBackend record ~ DB.MongoContext)
                   => Entity record -> DB.Document
documentFromEntity (Entity key record) =
    keyToMongoDoc key ++ entityToDocument record
documentFromEntity :: (PersistEntity record, PersistEntityBackend record ~ DB.MongoContext)
                   => Entity record -> DB.Document
documentFromEntity (Entity key record) =
    keyToMongoDoc key ++ entityToDocument record
documentFromEntity (Entity key record) =
    keyToMongoDoc key ++ entityToDocument record