title: Querying on relationship arrays in Realm
body: <p>Lets say I have a <code>Dog</code> and <code>Person</code> realm objects like</p>
  
  <pre><code>@interface Dog : RLMObject
  
  @property NSString *name;
  @property NSInteger age;
  
  @property RLMArray&lt;Person&gt; *owners;
  
  @end
  
  @implementation Dog
  
  @end
  
  RLM_ARRAY_TYPE(Dog)
  
  @interface Person : RLMObject
  
  @property NSString *name;
  @property RLMArray&lt;Dog&gt; *dogs;
  
  @end
  
  @implementation Person
  
  @end
  
  RLM_ARRAY_TYPE(Person)
  </code></pre>
  
  <p>This is the sample code from Realm's example project. The only difference is that <code>Dog</code> entity has an array of <code>Person</code> objects as <code>owners</code>, in other words an inverse relationship to <code>Person</code>'s <code>dogs</code>.</p>
  
  <p>Now the thing I want to accomplish is querying the <code>Dog</code> objects having a <code>Person</code> as one of the <code>owners</code>.</p>
  
  <p>How can I do that?</p>