On Thu, Jan 15, 2009 at 12:52:21PM +0100, Zoran Bosnjak wrote:
> > > What do you think of introducing a few more SQLObject methods, like:
> > > _update(self, **kw)
> > 
> >    It is called .set(). Be aware it is not called for a 
> > single attribute setting.
> 
> Why not? Is this a bug?

   Magic attributes are implemented using runtime-generated functions that
use lower-level (than .set()) calls.

> > > _del(self)
> > 
> >    .destroySelf()
> 
> This method is not called from "deleteMany". Then I've realised that not even 
> event is generated.
> Any good reason, why not?

   .deleteMany() goes directly to SQL, it doesn't touch objects at all. So
the users have to be aware and don't forget to clear object cache after
calling .deleteMany() (SQLObject doesn't clear the cache because the user
may want to call a few different .deleteMany() - clearing the cache is up
to the user).

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            p...@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to