On Thu, Dec 11, 2008 at 6:21 PM, Michael Bayer <mike...@zzzcomputing.com> wrote:
>
>
> On Dec 11, 2008, at 7:08 PM, Jorge Vargas wrote:
>
>>
>> Hi, has the behavior here
>> http://www.sqlalchemy.org/trac/wiki/FAQ#Whatsthebestwaytofigureoutwhichattributesarecolumnsgivenaclass
>> changed in 0.5?
>>
>> I'm trying that and getting
>>
>> AttributeError: iterate_properties
>>
>> this is my code, so far:
>>
>> klass = model.User
>>
>> def add_user():
>>    obj = klass()
>
> this is the error:
>
>>    mapper = class_mapper(klass).columns
>
> you want the mapper, not mapper.columns

ohhh I totally missed that from the other approach I had, which is a
trick, I don't remember where I picked it up which I think only works
for declarative.

klass.__table__.columns

thank you

--~--~---------~--~----~------------~-------~--~----~
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 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to