Added idAttribute, to map from MongoDB unique key to id.