On Mon, 2002-03-04 at 12:05, Martin Virtel wrote: > E-Mail von Geoffrey Talvola am 2002-03-04: > > > I added this item to the WishList in the Webware Wiki. It sounds like this > > might be pretty easy to fix; > > In fact, the three different "deletion" scenarios could be implemented with a > single SQL query, although this could make MiddleKit a bit too SQL-dependant. > But it's simply not necessary to resucitate an Object only to delete it. > > onDeleteOther=cascade > "delete from Class where refId=%s" % delObj.sqlObjRef()
This wouldn't work correctly if there is more than one level of cascade-deleting necessary; it's a bit more complicated. Although it would be nice if (for at least some database adapters) this functionality could be implemented using referential integrity. (i.e. for databases which support this, and if the object reference is set to 'cascade', MiddleKit should create tables with a foreign-key restraint and 'ON DELETE CASCADE' set.) Of course, you also need to ensure that MiddleKit's cache is up-to-date after the delete, so you pretty much need to do a bunch of queries to determine all the objects to be deleted. -- Jason D. Hildebrand [EMAIL PROTECTED] _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
