On Oct 30, 2007, at 11:25 AM, Paul Johnston wrote:

> Mike,
>
> use mapper.get_property(name) and mapper.iterate_properties ().   I've
> considered removing "properties" as a public accessor since it serves
> no useful purpose.
>
> This doesn't work for me - the following code outputs:
>
> [Column('id', Integer(), primary_key=True, nullable=False)]
> [Column('val', String(length=None,convert_unicode=False))]
>
> I can do a test case without Elixir if needed, but I don't think  
> that will change the result.
>
> from sqlalchemy import *
> from elixir import *
>
> __metadata__ = MetaData('mssql://./test')
>
> class Paj(Entity):
>     val = Field(String)
>
> class Bob(Entity):
>     paj = ManyToOne(Paj, primary_key=True, backref='bob')
>     silly = Field(Integer)
>
> for a in Paj.mapper.iterate_properties:
>     print a.columns
>

what is it youre looking for ?  those columns are associated with  
ColumnProperty objects associated with your mapper.  you want to  
filter out and get just the PropertyLoaders, those correspond to  
relation().




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