title: Correct way to retrieve a single object from Realm database
body: <p>I am absolutely loving Realm (0.92) in combination with Swift but have a question about reading an object from the database. My goal is to retrieve a single object with a known, unique ID (which also happens to be the primary key.</p>
  
  <p>All the documentation appears to be oriented around queries for multiple objects which are then filtered. In this case I know the object ID and, since it is known to be unique, would like to retrieve it directly.</p>
  
  <p>My current approach is as follows:</p>
  
  <pre><code>Realm().objects(Book).filter("id == %@", prevBook.nextID).first
  </code></pre>
  
  <p>This seems heavy-handed. Documentation from prior versions suggest that there is a more direct way but I can't seem to locate it in the documentation.</p>
  
  <p>The problem with my current approach is that it is crashing with an exception on the following function:</p>
  
  <pre><code>public func filter(predicateFormat: String, _ args: CVarArgType...) -&gt; Results&lt;T&gt;
  </code></pre>
  
  <p>The exception is mysteriously reported as:</p>
  
  <blockquote>
    <p>EXC_BAD_ACCESS (code=1, address=0xedf)</p>
  </blockquote>
  
  <p>Any suggestions are very welcome. </p>
  
  <p>Anticipating one line of questioning: I have confirmed that replacing prevBook.nextID with a known, good ID does not solve the problem</p>