I'm trying to create something of a genealogy database, I've had some
success, but I've also run into a couple of problems, so I thought I'd
post here to see if anyone could enlighten me as to the correct way to
accomplish this using SQLObject.
So far the relevant portions of my model.py look like this:
=A0=A0=A0=A0=A0=A0=A0=A0firstName =A0=3D StringCol()
=A0=A0=A0=A0=A0=A0=A0=A0familyName =3D StringCol()
=A0=A0=A0=A0=A0=A0=A0=A0father =A0 =A0 =3D ForeignKey('Person')
=A0=A0=A0=A0=A0=A0=A0=A0mother =A0 =A0 =3D ForeignKey('Person')
=A0=A0=A0=A0=A0=A0=A0=A0siblings =A0 =3D RelatedJoin('Person', joinColumn=
=A0=A0=A0=A0=A0=A0=A0=A0children =A0 =3D MultipleJoin('Person', joinColumn=
=A0=A0=A0=A0=A0=A0=A0=A0gender =A0 =A0 =3D EnumCol(enumValues=3D['Male','Fe=
I'm encountering some problems with how to handle the MultipleJoins for
the children field, and the RelatedJoins for siblings.
MultipleJoin issues, as posted above, when a person father is assigned,
they are correctly listed as a child of said father. =A0Unfortunately
this is not the case for assigning a mother because I don't know how to
specify two joinColumns for children. =A0Is there any clever trick to
work around this?
RelatedJoin issues, unlike other examples I've found, a sibling is a
siblings sibling, that sounds weird but I'm pretty sure its true, so
I'm try to join the table to itself and the column to itself. =A0I've
tried various permutation of settings for joinColumn, otherColumn, and
intermediate class, but it never seems to work.
On Sat, Mar 04, 2006 at 12:23:29PM -0800, Randall Rauwendaal wrote:
> I'm trying to create something of a genealogy database
Oleg Broytmann http://phd.pp.ru/ phd@...
Programmers don't die, they just GOSUB without RETURN.
Get latest updates about Open Source Projects, Conferences and News.