title: Core Data - how to set property of grandchild entity
body: <p>I'm new to CoreData and I have some problems in accessing properties of grandchild entities.
  I try to build a basic shopping app and I need to design a data model.<br>
  The articles in my app may have different colors and sizes, that the user can choose.  </p>
  
  <p>That's the important part of my data model:</p>
  
  <pre>
  |Article|     |ArticleColor|      |ArticleColorSize|  
  | name  |     |  color     |      |      size      |  
  | brand |&lt-->>|            |&lt-->> |     stock      |  
  | price |     |            |      |                |
  </pre>  
  
  <p>(colors and sizes are represented as an int so that it would not get too complicated)  </p>
  
  <p>I don't know if there's a better way to design the data model, but in this case I have problems in setting the grandchild's properties. Setting the color works quite good, but I am not able to get the ArticleColor object, which I set up before, and set its ArticleColorSizes.</p>
  
  <p>I hope my question got clear and someone may help me.</p>
  
  <p>Edit:
  I will give an example how this should work:</p>
  
  <p>There is an Article (clothing) - a <strong>shirt</strong><br>
  this <strong>shirt</strong> is available in different <em>colors</em> and <em>sizes</em> . Both are represented as an integer (resp. enum). Besides, I have to know, how many articles of a specific size and color are on <em>stock</em> .  </p>
  
  <p>So I thought, the easiest way to get these requirements into a data model, is the above. If I'm completely wrong, please correct me. (I have to admit that creating databases and data models is not my strength).</p>