On Jul 20, 11:28 am, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On Jul 20, 2008, at 7:48 AM, Sean Davis wrote:
>
>
>
> > I have been playing with 0.5 and have a very simple question.  If I
> > have a mapped class, User, how can I get at the columns of User?  I
> > see lots of constructs like User.c...., but User has no 'c' attribute
> > now.  I am looking at finding the column types, names (to loop over),
> > etc.
>
> theres a large section regarding this in the upgrade notes 
> athttp://www.sqlalchemy.org/trac/wiki/05Migration
> , though its focused on rationale .   The short answer for columns is  
> to use the Table (i.e. sometable.c.somecolumn, for col in  
> sometable.c:, etc).   If you want to get the table for a mapped class  
> if you don't have it already, say class_mapper(cls).mapped_table.

Thanks, and sorry I didn't look at that doc before asking.  That is
exactly what I needed.

Sean

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to