Re: [sqlalchemy] How to do scalar sub selects with the ORM correctly?

2017-06-15 Thread 'mike waites' via sqlalchemy
Ah right OK that make sense. I was going to say that using undefer felt kind of odd given that there's no existing property so this makes much more sense. Unfortunately I need to find a solution that works in the mean time until your patch is merged so whilst i have you maybe you can explain

Re: [sqlalchemy] How to do scalar sub selects with the ORM correctly?

2017-06-15 Thread mike bayer
On 06/15/2017 11:09 AM, 'mike waites' via sqlalchemy wrote: Thanks Mike. I will definitely give this patch a try. I think this is exactly what we need. Simon, thanks so much for sharing that post as well, bindparam had completely escaped my attention and that will actually solve my

Re: [sqlalchemy] How to do scalar sub selects with the ORM correctly?

2017-06-15 Thread 'mike waites' via sqlalchemy
Thanks Mike. I will definitely give this patch a try. I think this is exactly what we need. Simon, thanks so much for sharing that post as well, bindparam had completely escaped my attention and that will actually solve my immediate use case. @mike was just wondering if you could clarify

Re: [sqlalchemy] How to do scalar sub selects with the ORM correctly?

2017-06-15 Thread mike bayer
On 06/15/2017 08:25 AM, 'mike waites' via sqlalchemy wrote: Hi This is something i've been wrestling in different ways for some time so i thought it was time that i sought a definitive answer on what the "proper" way to do this is with the ORM. Often you'll want to have some kind of