title: CoreData Parent Children one to many inverse relationships using single entity
body: <p>I have a problem how to model properly in CoreData a <code>Person</code> with it's relationship to children with inverse using single entity to model.</p>
  <p>I want to model a family, so I have created an entity <code>Person</code> for each member. A <code>Person</code> can have parents, a father and mother - for this I have created <code>one-to-one</code> relationship. <code>Person</code> can have children which is a set of <code>one-to-many</code> relationship.</p>
  <p>I Have a problem with setting up the inverse in CoreData model as it is required for the relationships. The problem is that when I set <code>father</code>/<code>mother</code> attribute of entity <code>Person</code> to <code>children</code> it can only be set for only one of them, not for both a <code>father</code> and <code>mother</code>. Do you have a solution how to model this properly?</p>
  <p><a href="https://i.stack.imgur.com/b4dj2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/b4dj2.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/zB5n4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zB5n4.png" alt="enter image description here" /></a></p>