Index: Collection.php =================================================================== --- Collection.php (revision 7696) +++ Collection.php (working copy) @@ -1054,13 +1054,14 @@ * checks if one of the containing records is modified * returns true if modified, false otherwise * + * @param boolean $deep whether to process also the relations for changes * @return boolean */ - final public function isModified() { + final public function isModified($deep = false) { $dirty = (count($this->getInsertDiff()) > 0 || count($this->getDeleteDiff()) > 0); if ( ! $dirty) { foreach($this as $record) { - if ($dirty = $record->isModified()) { + if ($dirty = $record->isModified($deep)) { break; } }