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 at 
http://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.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
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