<div dir="ltr">Hi Alexander!<br><br><div>Thanks for your quick reply. I am sorry that I could not find the existing requests for such a feature.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-family:arial,sans-serif;font-size:13px">As you already the third person who ask about this type of queries in the last few days, I'll probably try to add this feature before the next Pony ORM release.</span></blockquote><div><br></div><div>That would be pretty cool. :) Not only is this way of selecting less to write, but it also feels much more natural.</div><div><br></div><div>Best regards,</div><div>NIklas</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 18 November 2014 20:56, Alexander Kozlovsky <span dir="ltr"><<a href="mailto:alexander.kozlovsky@gmail.com" target="_blank">alexander.kozlovsky@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Niklas!<span class=""><br><br>> <span style="font-family:arial,sans-serif;font-size:13px">I would much rather write the first version. Is this a limitation of Pony ORM?<br></span><br></span>Yes, currently Pony does not support the first version of your query. There is no reason why this query type cannot be implemented. I just need some time to do it. You are not the first person who ask about this feature, and someone already opened corresponding GitHub issue: <a href="https://github.com/ponyorm/pony/issues/65" target="_blank">https://github.com/ponyorm/pony/issues/65</a><br><br>Each feature requires some hours to implement it, and the list of features we want to add is pretty big: it includes migrations, MS SQL Server support, generic admin interface, SQL analytic functions, advanced PostgreSQL data types, etc., etc. Because it is impossible to do all of it at once, my algorithm to choose the next task is quite simple: typically it is the feature which was requested by the most number of users in the recent period of time. As you already the third person who ask about this type of queries in the last few days, I'll probably try to add this feature before the next Pony ORM release.<br><br>Regards,<br>Alexander.<br><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Nov 18, 2014 at 9:31 PM, Niklas Rosenstein <span dir="ltr"><<a href="mailto:rosensteinniklas@gmail.com" target="_blank">rosensteinniklas@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hello,<div><br></div><div>I try to use  pony.orm.select()  like this, where  User.accounts  is a Set for the Entity "Account".</div><div><br></div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">user = User[1]<br>print(select(a for a in user.accounts if a.label == 'label'))<br></blockquote><br></div><div>The solution to it would be</div><div><br></div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>user = User[1]</div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>print(select(a for a in Account if a.user == user and a.label == 'label'))</div></blockquote><br></div><div>I would much rather write the first version. Is this a limitation of Pony ORM?</div><div><br></div><div>Python 3.4.1</div><div>Pony ORM 0.6</div><div><br></div><div>Thanks in advance!</div><span><font color="#888888"><div>Niklas</div></font></span></div>
<br></div></div>_______________________________________________<br>
ponyorm-list mailing list<br>
<a href="mailto:ponyorm-list@ponyorm.org" target="_blank">ponyorm-list@ponyorm.org</a><br>
<a href="/ponyorm-list" target="_blank">/ponyorm-list</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
ponyorm-list mailing list<br>
<a href="mailto:ponyorm-list@ponyorm.org">ponyorm-list@ponyorm.org</a><br>
<a href="/ponyorm-list" target="_blank">/ponyorm-list</a><br>
<br></blockquote></div><br></div>