title: Relationship fault with core data
body: <p>(Using swift / Xcode beta 3)</p>
  
  <p>I have two entities in my project - a parent entity which has a one-to-many relationship with its children. When adding new objects before saving the context, everything works fine. However, after restarting the app and fetching parent object again I'm receiving 'relationship fault' for all of its children. This is how I'm saving my context : </p>
  
  <pre><code> func saveContext () {
      var error: NSError? = nil
      let appDel:AppDelegate = UIApplication.sharedApplication().delegate as AppDelegate
      let context =  appDel.managedObjectContext
  
      if context == nil {
          return
      }
      if !context.hasChanges {
          return
      }
      if context.save(&amp;error) {
          return
      }
  
      println("Error saving context: \(error?.localizedDescription)\n\(error?.userInfo)")
      abort()
  }
  </code></pre>
  
  <p>I tried changing <em>includesSubentities = true</em> and <em>setReturnsObjectsAsFaults = false</em> but it doesn't seem to help. Most of the answers to 'relationship fault' problem with Objective-C seemed to use <em>setRelationshipKeyPathsForPrefetching</em> but using it with NSFetchRequest in Swift seems to be impossible.</p>
  
  <p>Is there something I'm missing? </p>