How do I sort a Realm relationship query?
<p>I have two models in my Realm database to capture the idea that parents have children:</p>

<pre><code>class Parent: Object {
  dynamic var firstName: String
  dynamic var lastName: String
  var children: [Children] {
    return linkingObjects(Children.self, forProperty: "parent")
  }
}

class Children: Object {
  dynamic var firstName: String
  dynamic var lastName: String
  dynamic var parent: Parent?
}
</code></pre>

<p>The following query works to get a list of children for a given parent:</p>

<pre><code>dataArray = ParentObj.children
</code></pre>

<p>But what I would like to achieve is a sorted list of children.</p>

<pre><code>dataArray = ParentObj.children.sorted("firstName")
</code></pre>

<p>How do I accomplish this?</p>