title: iOS Doing subquery from RLMLinkingObjects
body: <p>This is my attachment model.</p>
  
  <pre><code>@interface Attachment : RLMObject
  @property BOOL isOfflineAvailable;
  @property BOOL isStarred;
  </code></pre>
  
  <p>In my category, I set up linking to attachment.</p>
  
  <pre><code>@property (readonly) RLMLinkingObjects *relatedAttachments;
  
  + (NSDictionary *)linkingObjectsProperties {
      return @{
               @"relatedAttachments": [RLMPropertyDescriptor descriptorWithClass:Attachment.class propertyName:@"category"],
               };
  }
  </code></pre>
  
  <p>Then, I am trying to query relatedAttachments and take only if isOfflineAvailable is true. </p>
  
  <pre><code>NSPredicate *pred = [NSPredicate predicateWithFormat:@"ANY relatedAttachments.isOfflineAvailable == YES"];
  
  self.categories = [[Category objectsWithPredicate:pred] sortedResultsUsingProperty:@"id" ascending:YES];
  </code></pre>
  
  <p>Problem is that it is empty (although there is data). How shall I do? If it is not linking object and just RLMArray, it is okay. </p>