convert all entityManagers to use mongoose.js