[PonyORM-list] select() and Cannot iterate over non-entity Object
Alexander Kozlovsky
alexander.kozlovsky at gmail.com
Tue Nov 18 19:56:00 UTC 2014
Hi Niklas!
> I would much rather write the first version. Is this a limitation of Pony
ORM?
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:
https://github.com/ponyorm/pony/issues/65
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.
Regards,
Alexander.
On Tue, Nov 18, 2014 at 9:31 PM, Niklas Rosenstein <
rosensteinniklas at gmail.com> wrote:
> Hello,
>
> I try to use pony.orm.select() like this, where User.accounts is a Set
> for the Entity "Account".
>
> user = User[1]
> print(select(a for a in user.accounts if a.label == 'label'))
>
>
> The solution to it would be
>
> user = User[1]
>
> print(select(a for a in Account if a.user == user and a.label == 'label'))
>
>
> I would much rather write the first version. Is this a limitation of Pony
> ORM?
>
> Python 3.4.1
> Pony ORM 0.6
>
> Thanks in advance!
> Niklas
>
> _______________________________________________
> ponyorm-list mailing list
> ponyorm-list at ponyorm.com
> /ponyorm-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </ponyorm-list/attachments/20141118/0f89da9a/attachment.html>
More information about the ponyorm-list
mailing list