Skip to content

is_dirty method always return true #17

@circulon

Description

@circulon

Migrated from: MasoniteFramework/orm#932
Original author: @bedus-creation
Originally opened: 2025-02-24
Original state: closed


Consider a simple code below

candidate = (
    Candidate()
    .query()
    .where('email', 'candidate-1@gmail.com')
    .first()
)

candidate = candidate.fill({
    "email": "candidate-1@gmail.com"
})

dd(candidate.is_dirty())

I am searching a candidate by email id, and setting the same value, and the candidate model says it's dirty.

Expected behavior
As the value is same as original, it shoudn't return the dirty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions