title: Update model Realm Swift
body: <p>I'm a new in Realm and ask you to help me.
  I created the model: </p>
  
  <pre><code>class UserModel: Object {
  
      dynamic var email = ""
      dynamic var facebook_id = ""
      dynamic var google_id = ""
      dynamic var id = 0
      dynamic var name = ""
      dynamic var photo = ""
      dynamic var someinfo = ""
      dynamic var twitter_id = "" 
  
  }
  </code></pre>
  
  <p>When I login to app, I can see my info on UserProfileController. Also I have a EditProfileController where I can change some info about myself. So when I successfully change it, I want to update my Realm model, and try to do this:</p>
  
  <pre><code>    let realm = try! Realm()
  
      try! realm.write {
          realm.create(UserModel.self, value: ["name": self.editEmail.text!, "email": self.editEmail.text!], update: true)
      }
  </code></pre>
  
  <p>But unfortunately I see this message:</p>
  
  <pre><code>''UserModel' does not have a primary key and can not be updated'
  </code></pre>
  
  <p>What if I want to update a few property at the same time? 
  Can I do this with primaryKey? Or...
  How it possible to update Realm model without primaryKey?</p>