type MyStruct struct {
ListingKey string
// other fields...
}
var x MyStruct{
"123",
// other fields
}
info, err := session.DB("mydb").C("mycollection").Upsert(bson.M{"listingkey": "123"}, x)
Can't modify shard key's value. field: listingkey: "123" collection: mydb.mycollection
How do I go around this?
Thanks,
-- JP