title: Many - Many Relationship Core Data
body: <p>I have a condition where I have many-many for my two entities:</p>
  
  <blockquote>
    <p>A category can have many places, in other hand, places can be also
    under many categories</p>
  </blockquote>
  
  <p>The data are successfully stored in my sqlite, but when I check the structure of both entites in sqlite manager software, the relationship between two of it is gone. </p>
  
  <p>Usually, when I declare 1..* , for example:</p>
  
  <blockquote>
    <p>Entity B has one entity A</p>
    
    <p>Place is under one category</p>
  </blockquote>
  
  <p>Category will become an attribute in Place, where I can use it for later use:</p>
  
  <pre><code>Category *category = (Category*)place.category;
  NSString *catId = category.catId;
  </code></pre>
  
  <p>and it should returns a value of <code>catId</code> if there is value there.</p>
  
  <p>But in my many-many case, I can't even get the <code>catId</code>, it crashes like this:</p>
  
  <pre><code>-[_NSFaultingMutableSet catID]: unrecognized selector sent to instance
  </code></pre>
  
  <p>Do I miss a concept here? I believe core data supports many to many relationship as I've read it in some web. Thanks!</p>