Re: [sqlalchemy] ORM query returning separate columns instead of objects

2021-09-01 Thread Mike Bayer
you can take the statement and execute it on the connection instead, then you'll get tuples with columns. not sure if there was some way to get this through session.execute() directly. On Tue, Aug 31, 2021, at 5:01 PM, Gord Thompson wrote: > My memory is failing me. I seem to recall that

[sqlalchemy] ORM query returning separate columns instead of objects

2021-08-31 Thread Gord Thompson
My memory is failing me. I seem to recall that there was a succinct way to get a 1.4/2.0 ORM query to return individual columns instead of ORM objects. That is, to tell this print(session.execute(select(User)).fetchall()) # [(<__main__.User object at 0x0090175EC700>,)] to return the