backendArrayOperation ::
  forall record typ.
  (PersistField typ, BackendSpecificUpdate (PersistEntityBackend record) record ~ MongoUpdate record)
  => MongoUpdateOperator -> EntityField record [typ] -> typ
  -> Update record
backendArrayOperation op fld val = BackendUpdate $
    ArrayUpdate fld $ UpdateValueOp (Left val) (Right $ MongoSimple op)
backendArrayOperation ::
  forall record typ.
  (PersistField typ, BackendSpecificUpdate (PersistEntityBackend record) record ~ MongoUpdate record)
  => MongoUpdateOperator -> EntityField record [typ] -> typ
  -> Update record
backendArrayOperation op fld val = BackendUpdate $
    ArrayUpdate fld $ UpdateValueOp (Left val) (Right $ MongoSimple op)
backendArrayOperation op fld val = BackendUpdate $
    ArrayUpdate fld $ UpdateValueOp (Left val) (Right $ MongoSimple op)