When I want to upsert my record I get duplicate key error.
The Code:
var update_query = Query.And(
Query.EQ("Id", item.Id) , ,
Query.EQ("UserId", item.UserId),
Query.EQ("Email",item.Email)
);
var resxs= coll.Update(update_query,
Update.Replace(item),
UpdateFlags.Upsert
);
But when I remove "Id" criteria,the code works and doing upset.
Is there anything I am missing.
thnx