PIM-3240: Make it work on MongoDB