Re: [sqlalchemy] Is this a bug?(about "Overriding Reflected Columns")

2011-04-01 Thread Michael Bayer
On Apr 1, 2011, at 1:12 AM, Inside Zhou wrote: > Thank you for you answer,but I'm sorry,I don't quite follow you. > > My confusion is that with the "s.query(User).all()",SA issues SQL stmt the > same as "user_table.select().execute()",but why the latter stmt can return > the row what I expecte

Re: [sqlalchemy] Is this a bug?(about "Overriding Reflected Columns")

2011-03-31 Thread Inside Zhou
Thank you for you answer,but I'm sorry,I don't quite follow you. My confusion is that with the "s.query(User).all()",SA issues SQL stmt the same as "user_table.select().execute()",but why the latter stmt can return the row what I expected whereas the former couldn't? besides,the table in DB cha

Re: [sqlalchemy] Is this a bug?(about "Overriding Reflected Columns")

2011-03-31 Thread Michael Bayer
On Mar 31, 2011, at 9:31 PM, Inside Zhou wrote: > First I try to create a table like this: > user_table = Table('user', metadata, > Column('id', Integer), > Column('name', Unicode) > ) > > then I discards the table in metadata and reload it by reflection with > overriding: > > user_tab

[sqlalchemy] Is this a bug?(about "Overriding Reflected Columns")

2011-03-31 Thread Inside Zhou
First I try to create a table like this: user_table = Table('user', metadata, Column('id', Integer), Column('name', Unicode) ) then I discards the table in metadata and reload it by reflection with overriding: user_table = Table('user', metadata, Column('id', Integer, primary_key=Tru