[sqlalchemy] Re: Explicit column in a SelectResults qry.

2007-03-08 Thread che
Hi, it would be good if SA has similar feature to return scalar, but from the point of view of objects - SA internally knows inheritance and so on ... so one doesnt have to bother of exact tables, but only the object. This can be usefull for reporting on top of SA - see for example if you have

[sqlalchemy] Re: Explicit column in a SelectResults qry.

2007-03-08 Thread Glauco
Michael Bayer ha scritto: SelectResults is used for mapped classes, the columns that are to be selected for a particular mapping are fixed. theres no reason youd want to be able to change the column clause. I try to do an example: create table macrocategory ( code char(3),

[sqlalchemy] Re: Explicit column in a SelectResults qry.

2007-03-08 Thread Michael Bayer
we currently have this feature: http://www.sqlalchemy.org/docs/adv_datamapping.myt#advdatamapping_selects which can return a result with more than one entity per row. the hard part here is defining the select statement. SQLAlchemy doesnt know how to compile select statements that go across

[sqlalchemy] Re: Explicit column in a SelectResults qry.

2007-03-07 Thread Glauco
Glauco ha scritto: CUT The simplest example is to specify columns to select on a generated qry (not all field of all tables involved in the generated qry). does the sqlalchemy.ext.selectresults.SelectResults object have something like column clause parameter of select function? Thank's