Skip to content

Commit

Permalink
Fixing regression in new select method when cascading deletes on rela…
Browse files Browse the repository at this point in the history
…tionships.
  • Loading branch information
KrisJordan committed Jul 16, 2010
1 parent 7e6b87e commit e735495
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ function select($modelOrModelSet) {
}

function onDeleteCascade(Model $model) {
$this->selectModel($model)->delete();
$this->select($model)->delete();
}

function onDeleteDelete(Model $model) {
$relatedModel = $this->selectModel($model);
$relatedModel = $this->select($model);
if($relatedModel != null) {
$relatedModel->delete(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ protected function augmentSelect(PdoDataSet $select) {
}

function onDeleteCascade(Model $model) {
$related = $this->selectModel($model)->delete();
$related = $this->select($model)->delete();

if(isset($this->through)) {
$modelPk = Model::primaryKeyName($model);
Expand Down

0 comments on commit e735495

Please sign in to comment.