[sqlalchemy] Re: Polymorphic association woes

2008-07-03 Thread az
what that should do? An association to a polymorphic object that is not plain-class-hierarchy (which is, several associations, one per subtype)? i am asking as this seems as another way to do aspects/multiple inheritance; my way is a single association with multiple references (to the

[sqlalchemy] Re: Polymorphic association woes

2008-07-03 Thread Michael Bayer
the first set of operations on the Session place every new object, including two Address objects and two GenericAssoc objects, in the session. Then the session is cleared. Then, a series of loads load in all those same objects, including the same Address objects and GenericAssoc

[sqlalchemy] Re: Polymorphic association woes

2008-07-03 Thread az
On Thursday 03 July 2008 17:15:40 Michael Bayer wrote: the first set of operations on the Session place every new object, including two Address objects and two GenericAssoc objects, in the session. Then the session is cleared. Then, a series of loads load in all those same objects,

[sqlalchemy] Re: Polymorphic association woes

2008-07-03 Thread Gaetan de Menten
On Thu, Jul 3, 2008 at 6:01 PM, [EMAIL PROTECTED] wrote: On Thursday 03 July 2008 17:15:40 Michael Bayer wrote: the first set of operations on the Session place every new object, including two Address objects and two GenericAssoc objects, in the session. Then the session is cleared. Then,

[sqlalchemy] Re: Polymorphic association woes

2008-07-03 Thread az
so my woe about this thing which i asked in the aspects-revisited mail: can i get all someaddress.members in ONE query? some secondary mapper - but how? polymorphic-union? On Thursday 03 July 2008 19:36:12 Gaetan de Menten wrote: On Thu, Jul 3, 2008 at 6:01 PM, [EMAIL PROTECTED] wrote: On

[sqlalchemy] Re: Polymorphic association woes

2008-07-03 Thread az
also, can someone explain what is the difference (sql-plan-wise) in the approaches? this one is: address - addressable - users - orders my one is otherway around: address - addressable - users - orders both declare multiple (per-type)

[sqlalchemy] Re: Polymorphic association woes

2008-07-03 Thread az
seems this way many users can have same adress, but one user (or order) cannot have more than one adress. so it's a polymorphic 1-to-many. my one is for a many to many. correct? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[sqlalchemy] Re: Polymorphic association woes

2008-07-03 Thread az
in this example, if u make another user u2 pointing to same address1, u1.adresses goes wrong... - last one wins. On Thursday 03 July 2008 19:36:12 Gaetan de Menten wrote: On Thu, Jul 3, 2008 at 6:01 PM, [EMAIL PROTECTED] wrote: On Thursday 03 July 2008 17:15:40 Michael Bayer wrote: the