all of them? same as any Python object: obj_attributes = [k for k in obj.__dict__]
On 11/6/07, Christophe Alexandre <[EMAIL PROTECTED]> wrote: > > > Hi, > > I am also interested in retrieving all the attributes resulting from the > ORM. > > The loop on '.c' will list only the database columns. Is there a way to > list the object attributes? > > Thanks a lot for your help, > > Chris > > -----Original Message----- > From: sqlalchemy@googlegroups.com [mailto:[EMAIL PROTECTED] > On Behalf Of Paul Johnston > Sent: Monday, November 05, 2007 8:45 PM > To: sqlalchemy@googlegroups.com > Subject: [sqlalchemy] Re: access mapped object attributes > > > Hi, > > >Given a Message object, do I have a way to retrieve all the attributes > >that result from the database mapping? > > > Try this: > > for col in Message.c: > ... > > Paul > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---