[sqlalchemy] filtering by variable attribute names

2013-07-23 Thread Matthew Pounsett
Does the ORM allow for filtering by a variable attribute name? I found this discussion using raw SQL: https://groups.google.com/d/topic/sqlalchemy/Axa-0thwOR8/discussion But the suggestion doesn't seem to apply in my case. Some sample code to demonstrate what I'm trying based on the above

Re: [sqlalchemy] filtering by variable attribute names

2013-07-23 Thread Simon King
On Tue, Jul 23, 2013 at 8:17 AM, Matthew Pounsett matt.pouns...@gmail.com wrote: Does the ORM allow for filtering by a variable attribute name? I found this discussion using raw SQL: https://groups.google.com/d/topic/sqlalchemy/Axa-0thwOR8/discussion But the suggestion doesn't seem to apply

Re: [sqlalchemy] filtering by variable attribute names

2013-07-23 Thread Matthew Pounsett
On Tuesday, 23 July 2013 04:16:24 UTC-4, Simon King wrote: You can use the standard python getattr function for this: Ah, of course. That should have occurred to me to try. Thanks, works like a charm! -- You received this message because you are subscribed to the Google Groups