Model/Behavior/RevisionBehavior.php
public function beforeDelete(Model $Model, $cascade = true) {
		if ($this->settings[$Model->alias]['auto'] === false) {
			return true;
		}
		if (!$Model->ShadowModel) {
			return true;
		}
		foreach ($Model->hasAndBelongsToMany as $assocAlias => $a) {
			if (isset($Model->{$assocAlias}->ShadowModel->_schema[$Model->alias])) {
				$joins = $Model->{$a['with']}->find('all', array('recursive' => -1, 'conditions' => array($a['foreignKey'] => $Model->
							id)));
				$this->deleteUpdates[$Model->alias][$assocAlias] = Hash::extract($joins, '{n}.' . $a['with'] . '.' . $a['associationForeignKey']);
			}
		}
		return true;
	}
public function beforeDelete(Model $Model, $cascade = true) {
		if ($this->settings[$Model->alias]['auto'] === false) {
			return true;
		}
		if (!$Model->ShadowModel) {
			return true;
		}
		foreach ($Model->hasAndBelongsToMany as $assocAlias => $a) {
			if (isset($Model->{$assocAlias}->ShadowModel->_schema[$Model->alias])) {
				$joins = $Model->{$a['with']}->find('all', array('recursive' => -1, 'conditions' => array($a['foreignKey'] => $Model->
							id)));
				$this->deleteUpdates[$Model->alias][$assocAlias] = Hash::extract($joins, '{n}.' . $a['with'] . '.' . $a['associationForeignKey']);
			}
		}
		return true;
	}
public function beforeDelete ( Model $ Model , $ cascade = true ) { if ( $ this -> settings [ $ Model -> alias ] [ 'auto' ] === false ) { return true ; } if ( ! $ Model -> ShadowModel ) { return true ; } foreach ( $ Model -> hasAndBelongsToMany as $ assocAlias => $ a ) { if ( isset ( $ Model -> { $ assocAlias } -> ShadowModel -> _schema [ $ Model -> alias ] ) ) { $ joins = $ Model -> { $ a [ 'with' ] } -> find ( 'all' , array ( 'recursive' => - 1 , 'conditions' => array ( $ a [ 'foreignKey' ] => $ Model -> id ) ) ) ; $ this -> deleteUpdates [ $ Model -> alias ] [ $ assocAlias ] = Hash :: extract ( $ joins , '{n}.' . $ a [ 'with' ] . '.' . $ a [ 'associationForeignKey' ] ) ; } } return true ; }
Causes revision for habtm associated models if that model does version control
on their relationship. BeforeDelete identifies the related models that will need
to do the revision update in afterDelete.

@param object $Model
@return bool Success
Causes revision for habtm associated models if that model does version control on their relationship . BeforeDelete identifies the related models that will need to do the revision update in afterDelete .