Hello,
I want to set (during query) a field (ID) of my struct to mongodb object id (_id). I also insert this struct in DB from xml. To avoid setting empty string as object id, I added the reflect tag `xml:"-"`.
As seen below in both cases the results are not what I desire.
Field1: ID bson.ObjectId `xml:"-" "_id"`
{
"_id": ObjectId("4fe92c4beaf9553e4d114af6"),
"id": "",
"headerlevel": {
Field 2: ID bson.ObjectId `xml:"-" bson:"_id"`
{
"_id": "",
"headerlevel": {
Desired behavior is
1. mgo insert objectid while insert
2. Populate the ID field with _id during query.
thanks.