// The following code has been copied from JacksonDBCollection and
// with mongo-jackson-mapper 1.4.x it can be replaced with call to
// MongoJacksonMapperModule.configure(mapper)
customizedMapper.registerModule(MongoJacksonMapperModule.INSTANCE);
customizedMapper.setHandlerInstantiator(new MongoJacksonHandlerInstantiator(
new MongoAnnotationIntrospector(customizedMapper.getDeserializationConfig())));
// end copy
return customizedMapper;
}