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

[BUG]: Dynamic update model issue #15413

Closed
chinalu opened this issue Apr 20, 2021 · 1 comment · Fixed by #15781
Closed

[BUG]: Dynamic update model issue #15413

chinalu opened this issue Apr 20, 2021 · 1 comment · Fixed by #15781
Assignees
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: high High

Comments

@chinalu
Copy link

chinalu commented Apr 20, 2021

Describe the bug
Same as #12773, when field type is Decimal or Float

If old value in database is 1.0, then use RawValue to update this field, will reproduce this bug. Because of following logic

case Column::TYPE_DECIMAL:
case Column::TYPE_FLOAT:
    let changed = floatval(snapshotValue) !== floatval(value);
    break;

Because:

floatval(new \Phalcon\Db\RawValue("f+1")) === float(1)

So to reproduce the issue, should be

  1. snapshotValue is 1,
  2. use RawValue to update this field
  3. the field type is DECIMAL or FLOAT
@chinalu chinalu added bug A bug report status: unverified Unverified labels Apr 20, 2021
@Jeckerson Jeckerson added the 5.0 The issues we want to solve in the 5.0 release label Nov 7, 2021
@BeMySlaveDarlin BeMySlaveDarlin added status: high High and removed status: unverified Unverified labels Nov 9, 2021
BeMySlaveDarlin pushed a commit to BeMySlaveDarlin/cphalcon that referenced this issue Nov 9, 2021
BeMySlaveDarlin pushed a commit to BeMySlaveDarlin/cphalcon that referenced this issue Nov 9, 2021
BeMySlaveDarlin pushed a commit to BeMySlaveDarlin/cphalcon that referenced this issue Nov 9, 2021
@niden
Copy link
Member

niden commented Nov 11, 2021

Resolved in #15781

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: high High
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants