[SQLObject] Storing object from same table
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Timo <tim...@gm...> - 2011-08-13 13:43:53
|
Hello, sorry if I use the wrong terminology, I just started with SQLObject and databases in general. This is my current class: class Person(SQLObject): name = StringCol(notNone=True) father = StringCol(default='') mother = StringCol(default='') This stores the names for the person's father and mother, but when I want to access their data, I need to fetch their names first and then lookup their objects from the database. What I actually want, is that father and mother are references to their own Person object. Is something like this possible? I read about SingleJoin/MultipleJoin, but it always references to another table. Cheers, Timo |