When getting the entities from MongoDB, query only for _id field.