title: does not Core Data Automatically take care with inverse relationships
body: <p>I have 3 entities like this:</p>
  
  <p><img src="https://i.stack.imgur.com/L1xJt.jpg" alt="sorry that this image has a problem that the &quot;day&quot; relationship of &quot;Week&quot; entity should be to-many, there should be 2 arrows on the end of the relationship"></p>
  
  <p>sorry that this image has a problem that the "day" relationship of "Week" entity should be to-many, there should be 2 arrows on the end of the relationship</p>
  
  <p>now here comes 2 questions.</p>
  
  <p>1st. For any Day-Class (Customized subclass of NSManagedObject) objects, after I take care about its relationships like:</p>
  
  <pre><code>Week* aWeek;
  Day *aDay;
  [aWeek addDayObject:aDay];
  </code></pre>
  
  <p>then I can truely find the Day through the Week Entity's relationship "day",</p>
  
  <p>but inversely, I found that the relationship "thisWeek" of the Day object "aDay" is still nil.</p>
  
  <p>I've heard that after you creat your subclass of NSMangedObject, you got methods like </p>
  
  <pre><code>- (void)addXXXObject:(xxx)xxx
  </code></pre>
  
  <p>to help you deal with to-many relationships and would automatically take care with the inverse relationship.</p>
  
  <p>but here it seems not. So do I have to deal with the inverse relationship by my self,</p>
  
  <p>or if core data does provide, how can I make it automatically add the object on the inverse relationship?</p>
  
  <p>2nd. Suppose there are many "Day"s with one "Week", connected by their relationship,</p>
  
  <p>what I want is , everytime the user delete one of the Days, we check whether if the Week still has some Days in relationship,</p>
  
  <p>if it does, just let the user delete that Day,</p>
  
  <p>if not, we also delete the "Week" object.</p>
  
  <p>So what Delete Rule of the to-many relationship should I use?</p>
  
  <p>I'm not so clear with these rules..</p>
  
  <p>Thanks!</p>