<div dir="ltr"><div>Say I have 2 entities with a one to many relationship:<br><br>    class A(db.Entity):<br>        bs = set('B')<br><br>    class B(db.Entity):<br>        a = Required('A')<br>        status = Required(unicode)<br>
<br><br>I then want to query for all "A", that have Bs that all have the status "whatever".<br><br>How I assumed it could be done:<br>    select(a for a in A if a.bs.status == 'whatever')<br><br>
or<br>    select(a for a in A if all(b.status == 'whatever' for b in <a href="http://a.bs">a.bs</a>))<br><br>But neither work. What is the "pony way" of doing this?<br><br>A python example of what I mean (I obviously would like to do it properly all in pony though):<br>
<br>    for a in models.A.select():<br>        if all(b.status == 'whatever' for b in <a href="http://a.bs">a.bs</a>):<br>            yield a<br><br></div>Thanks in advance for any guidance.<br clear="all"><div><br>
-- <br>Regards,<br><br>Matthew Bell<br>
</div></div>