Realm Swift - Filter on first element of a relationship
<p>I have 2 realm object A and B linked with a relationship :</p>

<pre><code>class A: Object {
    let Bs = List&lt;B&gt;()
}

class B: Object {
    dynamic var Id:Int = 0
}
</code></pre>

<p>So now, I need to get all A objects where the first Bs has the Id = 1.
If I use this line of code :</p>

<pre><code>realm.objects(A).filter("ANY Bs.Id = 1")
</code></pre>

<p>I get all A objects, where one of the Bs has the Id = 1. But in my case, I need to check only the first Bs. Is it possible to do that in Realm ? Is there something like : </p>

<pre><code>realm.objects(A).filter("FIRST Bs.Id = 1")
or
realm.objects(A).filter("TOP Bs.Id = 1")
</code></pre>

<p>Thank you for your help ! :)</p>

<p>Regards,</p>