Re: [sqlalchemy] SQLA 0.6.8 > Given an AssociationProxy, how can I get the class it would give me?

2011-12-08 Thread Hector Blanco
Just a little detail... To get the class of a "regular" relationship, I use a class_mapper: def getClassOfRelationship(cls, name): retval = None mapper = sqlalchemy.orm.class_mapper(cls) try: prop = mapper.get_property(name) if isinstance(pr

Re: [sqlalchemy] SQLA 0.6.8 > Given an AssociationProxy, how can I get the class it would give me?

2011-12-07 Thread Hector Blanco
Yes! Thank you for your, as usual :-) , quick, wise and right reply! I believe that's all I need. I already have in place all the machinery to deal with Columns, relationships, and stuff like that! Awesome (or as we would pronounce in my mother tongue, Spanish... osom!! ) 2011/12/7 Michael Bayer

Re: [sqlalchemy] SQLA 0.6.8 > Given an AssociationProxy, how can I get the class it would give me?

2011-12-07 Thread Michael Bayer
On Dec 7, 2011, at 7:53 PM, Hector Blanco wrote: > Hello everyone: > > In one of my classes, I am using an associationproxy to provide a list > in which the same item can be inserted twice. Basically, a product can > contain "images" (several times the same image). One product can have > two di

[sqlalchemy] SQLA 0.6.8 > Given an AssociationProxy, how can I get the class it would give me?

2011-12-07 Thread Hector Blanco
Hello everyone: In one of my classes, I am using an associationproxy to provide a list in which the same item can be inserted twice. Basically, a product can contain "images" (several times the same image). One product can have two different lists of "images" (images1 and images2... yep... not ve