title: Migration of data stored in RavenDB
body: <p>I have entities stored in RavenDB (build #888). I need to change theirs IDs, because of database migration, connected with newer version of the application.</p>
  
  <p>I've written sample function I'm using:</p>
  
  <pre><code>public bool Migrate()
  {
      using (var session = _store.OpenSession())
      {
          var users = session.Query&lt;User&gt;().ToList();
          foreach (var user in users)
          {
              user.Id = user.Email;
          }
          session.SaveChanges();
       }
  }
  </code></pre>
  
  <p>Execution of this code results in an exception:</p>
  
  <pre><code>Status: System.InvalidOperationException: Entity App.Models.Entities.User had document key 'mydomain-mylogin' but now has document key property 'mylogin@yahoo.com'.
  You cannot change the document key property of a entity loaded into the session
     at Raven.Client.Document.InMemoryDocumentSessionOperations.CreatePutEntityCommand(Object entity, DocumentMetadata documentMetadata)
     at Raven.Client.Document.InMemoryDocumentSessionOperations.PrepareForEntitiesPuts(SaveChangesData result)
     at Raven.Client.Document.InMemoryDocumentSessionOperations.PrepareForSaveChanges()
     at Raven.Client.Document.DocumentSession.SaveChanges()
  </code></pre>
  
  <p>How can it be done ?</p>