RE: [sqlalchemy] Re: To select only some columns from some tables using session object, relation many-to-many

2010-08-04 Thread King Simon-NFHD78
Alvaro Reinoso wrote: It works out, thank you! How could I just retrieve some columns from both tables? For example, if I try to select some columns from Item and Channel, I get class 'sqlalchemy.util.NamedTuple' when I'd like to get a channel type with its items: result =

[sqlalchemy] Re: To select only some columns from some tables using session object, relation many-to-many

2010-08-03 Thread Alvaro Reinoso
It works out, thank you! How could I just retrieve some columns from both tables? For example, if I try to select some columns from Item and Channel, I get class 'sqlalchemy.util.NamedTuple' when I'd like to get a channel type with its items: result = session.query(Channel.title,

[sqlalchemy] Re: To select only some columns from some tables using session object, relation many-to-many

2010-08-02 Thread Kalium
On Aug 3, 8:43 am, Alvaro Reinoso alvrein...@gmail.com wrote: Hello, I have these classes where items (class Item) is related to channel object. Channel can contain many items: channel_items = Table(         channel_items,         metadata,         Column(channel_id, Integer,