mongodb provider support trigger but not functions called in a trigger. So it's very diffcult to maintins code.