On Jun 9, 2008, at 1:09 AM, [EMAIL PROTECTED] wrote:

>
> okay here anopther way to represent it. "this" side is the given
> prop/descriptor, and then the hops towards "other" end side:
>
> MtoN:
>    containerthis: getattr( prop.parent.class_, prop.key)
>     midthis: getattr( prop.secondary, prop.remote_side[0])
>      -> this: getattr( prop.parent.class_, prop.local_side[0])
>     midother:getattr( prop.secondary, prop.remote_side[1])
>      -> other:getattr( prop.mapper.class_, prop.local_side[1])
>    containerother: getattr( prop.mapper.class_, ??????)
>
> 1toN:
>    containerthis: getattr( prop.parent.class_, prop.key)
>     other:getattr( prop.mapper.class_, prop.remote_side[0])
>      -> this:getattr( prop.parent.class_, prop.local_side[0])
>    other:getattr( prop.mapper.class_, ??????)
>
> *to1:
>    this: getattr( prop.parent.class_, prop.key) ->
>     this:getattr( prop.parent.class_, prop.local_side[0])
>      -> other:getattr( prop.mapper.class_, prop.remote_side[0])
>    other:getattr( prop.mapper.class_, ??????)
>
> did i get it right?
> how the backrefs would come above?
> is the assoc_proxy pattern looking similar as plain m2m or would be
> very different?


association proxy is a 1->M -> M->1

look at prop.direction in (ONETOMANY, MANYTOONE, MANYTOMANY) to figure  
the "direction" of the relation, since that's what your is_parent  
concept seems to derive from.

the PropertyLoader is pretty agnostic about backref/collection/etc  
with regards to "direction".


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