Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mvc\Model::snapshot data cast #14377

Merged
merged 8 commits into from
Sep 18, 2019
Merged

Conversation

zsilbi
Copy link
Member

@zsilbi zsilbi commented Sep 10, 2019

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

Small description of change:

When orm.cast_on_hydrate is on, I think Model::cloneResultMap() should save the casted values to the snapshot data.
If it's off, then Model::getChangedFields() should not use === to check if the field has changed.

Thanks,
zsilbi

phalcon/Mvc/Model.zep Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Sep 17, 2019

Codecov Report

Merging #14377 into 4.0.x will decrease coverage by 0.13%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##            4.0.x   #14377      +/-   ##
==========================================
- Coverage   67.63%    67.5%   -0.14%     
==========================================
  Files         478      478              
  Lines      110989   110991       +2     
==========================================
- Hits        75069    74924     -145     
- Misses      35920    36067     +147

@ruudboon ruudboon merged commit 3562f11 into phalcon:4.0.x Sep 18, 2019
@zsilbi zsilbi deleted the model-snapshot-cast branch September 18, 2019 08:31
@niden niden added 4.0 documentation Documentation required labels Sep 18, 2019
@niden niden removed the documentation Documentation required label Dec 15, 2019
@niden niden added bug A bug report status: low Low and removed Bug - Low labels Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report status: low Low
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants