[sqlalchemy] family tree

2007-09-27 Thread jawarumnur
Hello, I'd like to build something like a family tree where descendants, mother and father are properties (of each person-object) defined by a mapper. When these properties are accessed, one (in case of mother or father) new person-object schould be loaded, or a list of person-objects (in case

[sqlalchemy] Re: family tree

2007-09-27 Thread jawarumnur
You might want to have a look at Adjacency List Relationships: http://www.sqlalchemy.org/docs/04/mappers.html#advdatamapping_relatio... Thanks for your reply. But that is what I already looked at and tried to use, but it didn't work. I think the problem is, that there are two columns (mother

[sqlalchemy] Re: family tree

2007-09-27 Thread jawarumnur
Ok, I just read about the relation option foreign_keys... I think, that might be the 'magic' of the whole thing^^ sry, for bothering you, jawa --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To

[sqlalchemy] Re: family tree

2007-09-27 Thread jawarumnur
thanks, I'll try that, if the relation option foreign_keys didn't do it. I'd like to get normal properties with normal getter and setter or append methods. I use sqlalchemy because I don't want to write all these methods by myself ;) greetz, jawa

[sqlalchemy] Re: family tree

2007-09-27 Thread jawarumnur
mh, you're right. I'm not yet very familiar with sqlalchemy since this is my first try. I thought about a WHERE clause additional to the join condition to differentiate the genders but probably that won't work either. I'll try to use python properties then, I think. thanks, jawa