[sqlalchemy] Re: Is there a simple way to let records have the same groups as it parents

2008-08-28 Thread az
this is sort of inheritance of data, right? the best i've made so far about this is to get (somehow) all the Rs each with it's groups, and then do the inheritance (union over the path towards root in your case) over the result rows by hand. if u find a better way let me know... traversing a

[sqlalchemy] Re: Is there a simple way to let records have the same groups as it parents

2008-08-28 Thread Cecil Westerhof
2008/8/28 [EMAIL PROTECTED]: this is sort of inheritance of data, right? You could it call like that I suppose. the best i've made so far about this is to get (somehow) all the Rs each with it's groups, and then do the inheritance (union over the path towards root in your case) over the

[sqlalchemy] Re: Is there a simple way to let records have the same groups as it parents

2008-08-28 Thread Michael Bayer
On Aug 28, 2008, at 8:11 AM, Cecil Westerhof wrote: 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

[sqlalchemy] Re: Is there a simple way to let records have the same groups as it parents

2008-08-28 Thread Cecil Westerhof
2008/8/28 Michael Bayer [EMAIL PROTECTED]: On Aug 28, 2008, at 8:11 AM, Cecil Westerhof wrote: 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

[sqlalchemy] Re: Is there a simple way to let records have the same groups as it parents

2008-08-28 Thread Michael Bayer
On Aug 28, 2008, at 10:54 AM, Cecil Westerhof wrote: On the Query side, the basic job is to formulate joins to the parent, Would it no be better to the child? Otherwise you need to traverse all records, which would be inefficient -I think- when for example only 1% of the records are in

[sqlalchemy] Re: Is there a simple way to let records have the same groups as it parents

2008-08-28 Thread az
On Thursday 28 August 2008 18:00:08 Michael Bayer wrote: On Aug 28, 2008, at 10:54 AM, Cecil Westerhof wrote: On the Query side, the basic job is to formulate joins to the parent, Would it no be better to the child? Otherwise you need to traverse all records, which would be inefficient