On Thu, Dec 13, 2007 at 02:16:15PM -0300, Leandro Sales wrote: > class DBObject(InheritableSQLObject): > title = UnicodeCol(length=100, default="") > > class DBItem(DBObject, InheritableSQLObject): > local_path = UnicodeCol(length=1000, default="") > > If I do: > DBItem.deleteMany(LIKE(DBItem.q.local_path, local_path + "%")) > ... SQLObject deletes from db_item table but maintains the correspondent > item in db_object
Alas, deleteMany doesn't work with Inheritance. Even worse, with deleteMany you may have cache coherency problem The only way to properly delete objects is to loop over them and destroy them one by one: for item in DBItem.select(LIKE(DBItem.q.local_path, local_path + "%")): item.destroySelf() Oleg. -- Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss