Re: [sqlalchemy] Trying to map a big arbitrary query to a class

2014-03-26 Thread Michael Robellard
reread your example code, that will actually do the trick. On Wednesday, March 26, 2014 9:07:52 AM UTC-4, Michael Robellard wrote: > > I want it mapped to an object because I want to have some > properties/methods that can be executed on each row of the results that > will do some additional log

Re: [sqlalchemy] Trying to map a big arbitrary query to a class

2014-03-26 Thread Michael Robellard
I want it mapped to an object because I want to have some properties/methods that can be executed on each row of the results that will do some additional logic. On Tuesday, March 25, 2014 6:21:31 PM UTC-4, Michael Bayer wrote: > > > On Mar 25, 2014, at 2:43 PM, Michael Robellard > > > wrote:

Re: [sqlalchemy] Trying to map a big arbitrary query to a class

2014-03-25 Thread Michael Bayer
On Mar 25, 2014, at 2:43 PM, Michael Robellard wrote: > Hello, I have what seems like a simple problem, but the only solution I have > come up with so far isn't very good. I have a large complex query that is > hand optimized that is built from aggregates and other data from different > mappe

[sqlalchemy] Trying to map a big arbitrary query to a class

2014-03-25 Thread Michael Robellard
Hello, I have what seems like a simple problem, but the only solution I have come up with so far isn't very good. I have a large complex query that is hand optimized that is built from aggregates and other data from different mapped tables. I can create a query for it by doing Session.query([co