title: How do I extend a NSManagedObject to contain MKAnnotation in Swift?
body: <p>I have a Photo class</p>
  
  <pre><code>class Photo: NSManagedObject {
  }
  </code></pre>
  
  <p>I want to extend it to provide MKAnnotation</p>
  
  <p>I tried doing it so by</p>
  
  <pre><code>extension Photo: MKAnnotation  {
  
      var coordinate: CLLocationCoordinate2D
  </code></pre>
  
  <p>However the compiler complains that extensions cannot have stored properties.</p>
  
  <p>Is there a better way of accomplishing this?</p>
  
  <p>Thanks.</p>