Re: [sqlalchemy] Re: find the table columns

2010-01-21 Thread laurent FRANCOIS
On Thu, 2010-01-14 at 05:29 -0800, Kosu wrote: try this: user.__table__.c.keys() should work Kos Rafal AttributeError: 'User' object has no attribute '__table__' thanks anyway On 14 Sty, 11:39, laurent FRANCOIS lau.franc...@worldonline.fr wrote: Hello everybody Let's say

[sqlalchemy] find the table columns

2010-01-14 Thread laurent FRANCOIS
no? Thanks Laurent FRANCOIS -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options

[sqlalchemy] more than one one to many relation

2009-11-21 Thread laurent FRANCOIS
Hello, What is the pattern for more than one relation one to many. I have on parent with 2 childs. parent_table = Table('parent', metadata, Column('parent_id', Integer, primary_key=True) ) child1_table = Table('child1', metadata,

[sqlalchemy] Re: setattr and mapped ORM

2009-10-24 Thread laurent FRANCOIS
On Wed, 2009-10-21 at 09:24 -0700, David Gardner wrote: Using setattr() shouldn't be a problem, however the __dict__ attribute also has other things in there like _sa_instance_state that I don't believe you want to copy to the new item. Try this instead: for col in object_mapper(update):

[sqlalchemy] Re: setattr and mapped ORM

2009-10-24 Thread laurent FRANCOIS
On Wed, 2009-10-21 at 09:24 -0700, David Gardner wrote: Using setattr() shouldn't be a problem, however the __dict__ attribute also has other things in there like _sa_instance_state that I don't believe you want to copy to the new item. Try this instead: for col in object_mapper(update):

[sqlalchemy]

2009-02-21 Thread laurent FRANCOIS
Hello Is it obvious that this model: % ##Class Table user_table = Table( 'user', metadata, Column('user_id', Integer, primary_key=True), Column('fname', Unicode(50), default=''),