mongodb中ObjectId查询的结果一直变的问题
二者本来应该是相同的值,但是每次查询都在变化,
@Id
@ApiModelProperty(value = "主键")
@Field(value = "_id")
var _id:ObjectId? = null
@NotEmpty(groups = [AddGroup::class], message = "id不能为空")
var id: String? = null
原来是这么记录的,直接改成String
@Id
@ApiModelProperty(value = "主键")
@Field(value = "_id")
var _id:String? = null
@NotEmpty(groups = [AddGroup::class], message = "id不能为空")
var id: String? = null
完事