Skip to content

CP-17382 skipattributes no longer skips mysql#17383

Merged
niden merged 5 commits into
5.0.xfrom
CP-17382-skipattributes-no-longer-skips-mysql
Jul 20, 2026
Merged

CP-17382 skipattributes no longer skips mysql#17383
niden merged 5 commits into
5.0.xfrom
CP-17382-skipattributes-no-longer-skips-mysql

Conversation

@niden

@niden niden commented Jul 20, 2026

Copy link
Copy Markdown
Member

Hello!

In raising this pull request, I confirm the following:

  • I have read and understood the Contributing Guidelines
  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • I have updated the relevant CHANGELOG
  • I have created a PR for the documentation about this change

Fixed Phalcon\Mvc\Model ignoring attributes registered with skipAttributes(), skipAttributesOnCreate() and skipAttributesOnUpdate(), so a skipped column was emitted in the generated INSERT/UPDATE (breaking, for instance, inserts into a table with a MySQL generated column). The skip list is keyed with null values, and isset() on an array offset now follows PHP semantics (key present and value not null), which made every skipped attribute read as not registered; the checks in doLowInsert(), doLowUpdate() and the not-null validation now use array_key_exists().

Thanks

@niden
niden requested a review from Jeckerson July 20, 2026 17:46
@niden niden self-assigned this Jul 20, 2026
@niden niden added bug A bug report status: medium Medium 5.0 The issues we want to solve in the 5.0 release labels Jul 20, 2026
@niden
niden merged commit 7f4fc19 into 5.0.x Jul 20, 2026
660 of 672 checks passed
@niden
niden deleted the CP-17382-skipattributes-no-longer-skips-mysql branch July 20, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.0 The issues we want to solve in the 5.0 release bug A bug report status: medium Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant