Removing select objects of a particular class

Combining the syntax of the load and remove methods, you can use the static version of the remove method to remove particular objects:

MT::Foo->remove({ bar => 'baz' });

The terms you specify to remove by should be indexed columns. This method will load the object and remove it, firing the callback operations associated with those operations.

This page was last updated on 2008-10-01, 17:07.

Leave a note

Have a question? Please use the MT Forums. Notes submitted on documentation should pertain to tips & hints regarding documentation. Your note may be removed once its contents have been integrated into the body of the page.