title: FetchRequest to fetch items from a one to many relationship?
body: <p>I have two entities, one called projects and one called tasks, and projects can have many tasks to them. I have a fetch request that can fetch all tasks, but I want to modify it so that it only fetches tasks from the observed project.</p>
  <p>Here are my two classes with the one to many relationship:</p>
  <pre><code>extension ProjectItem {
  
      @NSManaged public var projectId: UUID
      @NSManaged public var projectTitle: String
      @NSManaged public var projectDateCreated: Date
      @NSManaged public var task: NSSet
  
  }
  </code></pre>
  <pre><code>extension TaskItem {
  
      @NSManaged public var completedDate: Date
      @NSManaged public var createdDate: Date
      @NSManaged public var id: UUID
      @NSManaged public var isComplete: Bool
      @NSManaged public var title: String
      @NSManaged public var project: ProjectItem?
  }
  </code></pre>
  <p>Here is the basic fetch request I currently have that fetches all completed tasks. How can I modify this fetch request to only fetch tasks that belong to an observed project?</p>
  <pre><code>    @FetchRequest(entity: TaskItem.entity(), sortDescriptors: [NSSortDescriptor(keyPath: \TaskItem.createdDate, ascending: false)], predicate: NSPredicate(format: &quot;isComplete == %@&quot;, NSNumber(value: false))) var taskItems: FetchedResults&lt;TaskItem&gt;
  </code></pre>
  <p>Thank you!</p>