Skip to content

increment does not create field if missing #97

Closed
@bitinn

Description

@bitinn

by default mongodb's $inc will create a field when incrementing a field that does not exists, i am not sure if the guard on this line is necessary?

When we try to increment a field that does not exists, the query passes but field was not created.

https://github.com/jenssegers/Laravel-MongoDB/blob/dd899e2c1bee5c4e31fe406499b0523280352032/src/Jenssegers/Mongodb/Query/Builder.php#L404

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions