|
From: Oleg B. <ph...@ph...> - 2004-04-22 16:36:50
|
On Thu, Apr 22, 2004 at 11:19:32AM -0500, Ian Bicking wrote:
> class Term(SQLObject):
>
> translation = ForeignKey('Term')
>
> # This is definitely a separate idea from the above!:
> translatedTerms = MultipleJoin('Term', joinColumn='translation_id')
>
> I believe that will work, but I'm not sure.
This should work, and I actually have thought about this solution...
That is, if this a subterm, just allow translation to be None, and if it
is a mster term, set translation like this?
subterm = Term.new()
masterterm = Term.new(translation=subterm)
print masterterm.translatedTerms # => [subterm]
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|