I was just wondering if the folowing possible.

A record has severall groups connected through a N:M relation.
But it also has a parent. What I would like is that all the groups
from the parent (and its parent, etc.) also are seen as group for the
record.
When the parent has a group added or removed that should then be
'visible' at the child.
Not a very good description I am afraid, so I'll try to give an example.

Say I have the groups G1, G2, G3, G4 and G5.
I have the records R1 and R2. R1 is the parent of R2 and does not have
a parent itself.

If R1 has the groups G1 and G2 and R2 has the groups G2, G4 and G5,
then when asking the list of groups of R2 should give, G1, G2, G4 and
G5.
When quering for records that have group G1, both R1 and R2 should be returned.

When adding G3 to R1 the list for R2 should be: G1, G2, G3, G4 and G5.
When removing G1 from R1 the list for R2 should be: G2, G3, G4 and G5.
When removing G2 from R1 the list for R2 should be: G2, G3, G4 and G5.
(R2 has itself also group G2.)

Is this possible with sqlalchemy or has this to be done by hand?

-- 
Cecil Westerhof

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