hexstr2ObjectId static method

ObjectId hexstr2ObjectId(
  1. String hexstr
)

将HexString转换为ObjectId,失败返回emptyObjectId

Implementation

static ObjectId hexstr2ObjectId(String hexstr) => parseObjectId(hexstr);