title: Should a primary key be also a required property in Realm?
body: <p>I have 3 questions about the same topic:</p>
  
  <ol>
  <li>How can I <strong>prevent</strong> saving an object to Realm with a nil primaryKey? </li>
  <li>Are primaryKeys in Realm implicitly requiredProperties?</li>
  <li>Which one of below is true? </li>
  </ol>
  
  <p>1.option:</p>
  
  <pre><code>+ (NSString *)primaryKey {
      return @"myUniqueID";
  }
  
  + (NSArray&lt;NSString *&gt; *)requiredProperties {
      return @[@"myUniqueID", @"name", @"surname"];
  }
  </code></pre>
  
  <p>2.option:</p>
  
  <pre><code>+ (NSString *)primaryKey {
      return @"myUniqueID";
  }
  
  + (NSArray&lt;NSString *&gt; *)requiredProperties {
      return @[@"name", @"surname"];
  }
  </code></pre>