From: Ryan H. <rh...@sh...> - 2004-12-02 23:16:27
|
* Martin d'Anjou <Mar...@s2...> [2004-12-02 16:14]: > > 2. Avoid issuing the subseqent select to initialize newly created > > objects (_init() calls selectOne()) > > > > Ryan Harper > > The purpose of SQLObject._init() seems to be the initialization of the > instance member values. To do that, it needs to fetch the data from the > database. But since this is called on object creation, the data should be > known without going to the database. > I don't mind this being done. It is a clean design to initialize the members from the results of the insert. I don't want that changed, rather I want something like: Person(name="Bob",__cache=False,__initObject=False) The above telling SQLObject to not add a ref to the connection._cache and to not bother running _init(). Ryan Harper |