From: Oleg B. <ph...@ph...> - 2004-04-22 16:12:41
|
On Thu, Apr 22, 2004 at 10:59:25AM -0500, Ian Bicking wrote: > Hmm... so this doesn't work? > > class Term(SQLObject): > translation = ForeignKey('Term') It is not what I want. The table must work (and is working now with my _get_ and _set_) the following way: there is a term and a list of translations. Master term can have or have not translations (aterm.translation is None). If there are translations, they are terms from the same table, and for every translation there is no a subtranslation: for t in aterm.translation: if t.translation is not None: raise TypeError Well, this is not enforced now, and it is not important to my question. The question is - how to make translation MultipleJoin? I'd like to declare class Term(SQLObject): translation = MultipleJoin("Term") but there is no a ForeignKey for it. How can I declare id as the ForeignKey? Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |