title: mongo db throws error trying to edit _id field in update
body: <p>I am trying to update a document</p>
  
  <p><code>final Update update = new Update();
  update.set("id", String.valueOf(partnerId));
  update.pushAll("appIds", appIds.toArray());
  mongoTemplate.upsert(Query.query(Criteria.where("partnerId").is(partnerId)), update, PartnerAppIds.class);</code></p>
  
  <p>On executing this getting this error
  <code>{  "err" : "After applying the update to the document {_id: \"66\" , ...}, the (immutable) field '_id' was found to have been altered to _id: \"5}</code></p>
  
  <p>The document looks like this</p>
  
  <pre><code>public class PartnerAppIds {
  @Indexed
  private String id;
  
  @Indexed
  private Long partnerId;
  
  @Indexed
  private Set&lt;String&gt; appIds;
  
  public Long getPartnerId() {
      return partnerId;
  }
  
  public void setPartnerId(Long partnerId) {
      this.partnerId = partnerId;
  }
  
  public Set&lt;String&gt; getAppIds() {
      return appIds;
  }
  
  public void setAppIds(Set&lt;String&gt; appIds) {
      this.appIds = appIds;
  }
  
  public String getId() {
      return id;
  }
  
  public void setId(String id) {
      this.id = id;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>My question is as I have a id field, why mongo is assuming i am updating '_id' field, where as I am updating the id field here. Are _id and id same for mongo here</p>