title: Salesforce upsert failing on an INVALID_FIELD error
body: <p>I'm using the standard Case object from Salesforce (we have some custom fields but that doesn't appear to be the problem). The Case has a linked subquery to its Comments, replicated in the SOAP API as CaseComments. </p>
  
  <p>My test case (an NUnit test) for upserting records is to query() for one by case number, change something on the Case itself, and upsert that record again. I'm not even adding a new comment or anything. When the upsert call goes out, I get an INVALID_FIELD error stating that CaseComments doesn't exist on the Case table in the cloud. Of course it doesn't exist, and the API should know better. Or maybe I'm not telling it something. Help?</p>
  
  <p>Relevant code:</p>
  
  <pre><code>[Test]
  public void TestUpsertOfExistingRecord()
  {
      var existingCase = sfRepository.GetCaseByNumber("00235452");
  
      var siteState = existingCase.Site_State__c;
  
      existingCase.Site_State__c = "Arkansas";
  
      //Tried the below line; the API didn't even recognize my Case as a valid object
      //existingCase.CaseComments = null;
  
      sfRepository.Save(existingCase);
  
      ...
  }
  
  //In the repository
  public void Save&lt;T&gt;(T unboundInfo) where T : sObject
  {
      service.Upsert(new sObject[]{unboundInfo});
  }
  
  //in a wrapper for the websevice
  public void Upsert(sObject[] unboundInfo)
  {
      //webService is the actual SOAP service client created by VS
      webService.upsert(unboundInfo.First().Id, unboundInfo);
  }
  </code></pre>
  
  <p>UPDATE: As per some suggestions, instead of using the Case instance produced by the query, I am creating a new Case. That is failing with permission errors, and as the field I was trying to modify was a projection from another related object (the Account's address) it's understandable. I'll keep banging away at it; in the meantime, can anyone tell me why creating a new Case with the same information works, when cleaning out all related queries of a retrieved Case does not?</p>