title: Core Data (iPhone)- Limiting the fetch results across a relationship
body: <p>I have recently been looking at Core Data for the iPhone and I have one query which I have not been able to find an answer to in the literature.</p>
  
  <p>Lets imagine that I have a <strong>User</strong> model object with a to-many relationship with a <strong>Purchase</strong> object. A <strong>User</strong> may have thousands of purchases.</p>
  
  <p>All of the information I have seen thus far seems to suggest that a fetch operation carried out across that relationship would return an NSSet with all of the <strong>Purchase</strong> objects associated with a particular <strong>User</strong>. </p>
  
  <p>Clearly I would prefer if there was some way to limit the number of <strong>Purchase</strong> objects fetched by:</p>
  
  <p>1) imposing some sort of criteria (e.g. only purchases over £1000 etc.); or</p>
  
  <p>2) only fetching in batches if the above is not possible.</p>
  
  <p>Is the above possible? I am just concerned that with the limited memory of the iPhone that I risk overloading it with thousands of unnecessarily fetched objects.</p>
  
  <p>Thanks in advance for any replies.</p>