Skip to content

model id property returns the builder and not the id #2660

Closed
@Treggats

Description

@Treggats
  • Laravel-mongodb Version: 4.0.0
  • PHP Version: 8.2
  • Database Driver & Version: Mongo & db.version() gives me 7.0.0
  • Laravel 10.30.0

I've created #2661 for this issue.

Description:

laravel/framework#48852 updated the way method's are called/proxied.
It seems that it requires that the list with methods should be lowercase, as the Mongo Builder class doesn't have that the Builder is returned instead of the method that should have been called.

Steps to reproduce

  1. Laravel app version 10.30.0
  2. create connection / model which uses Mongo as backend
  3. $model->id would return the Builder

Expected behaviour

When calling $model->id I expect a string with the id for the model.

Actual behaviour

Calling $model->id returns a Builder instance.

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