title: CoreData: Not null property should be optional?
body: <p>I'm not sure about best practice of Swift and CoreData. Do you think that not null property should be optional basically?</p>
  
  <p>for example </p>
  
  <pre><code>import Foundation
  import CoreData
  
  class Item: NSManagedObject {
      @NSManaged var itemId: String // Not null property
      @NSManaged var itemPrice: String? // null is possible
  }
  </code></pre>
  
  <p>I wonder that I should notify to other programmers which property is not-null or not.</p>
  
  <p>I would like to know what do you do usually. This question sound an opinion-based but I'm sure how dealing the optional is helpful for others.</p>
  
  <p>FYI I found similar question</p>
  
  <p><a href="https://stackoverflow.com/questions/23549443/coredata-setting-a-property-of-entity-to-be-not-null-should-the-attribute-be">CoreData - Setting a property of entity to be not null - Should the attribute be set as Optional or Mandatory</a></p>