Fix `DetailableBehavior` bug on `Model::saveAll`. Closes #2. #3

merged 3 commits into from Feb 28, 2014


None yet
1 participant

jadb commented Feb 28, 2014

Dirty workaround but required.

  • added the bypass option to avoid the CommonDetailModel::save call being run by default (effectively disabling it on Model::saveAll),
  • added the DetailableBehavior::beforeValidate that unsets the detailed data to avoid breaking it by the Model::validateMany.

Undefined property DetailableBehavior::$__dataToSave.

Shouldn't DetailableBehavior::$__dataToSave be unset at this point?

@jadb jadb added a commit that referenced this pull request Feb 28, 2014

@jadb jadb Merge pull request #3 from gourmet/2-save-triggered-twice
Fix `DetailableBehavior` bug on `Model::saveAll`. Closes #2.

@jadb jadb merged commit 76f9e4f into master Feb 28, 2014

jadb deleted the 2-save-triggered-twice branch Feb 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment