Re: [SQLObject] Inheritance looses column
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ph...> - 2009-09-07 12:11:43
|
On Mon, Sep 07, 2009 at 03:58:15PM +0400, Oleg Broytmann wrote: > On Mon, Sep 07, 2009 at 01:34:51PM +0200, Tobias Weber wrote: > > I'm still not sure if SQLObject is behaving correctly, though. What's > > the point of _init if you can't access data yet? > > In this particular case _init is called in the middle of fetching > children. InheritableIteration.next() calls obj.get() which in turn calls > parent.get(), etc; every .get() calls _init, but to access all attributes > you have to wait until all .get's are finished. The same for .get() - InheritableSQLObject.get() calls super().get() which calls self._init() before self._parent.get() so _init() is called in the middle of the job - not all attributes are fetched yet. Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |