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

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

Closed
Treggats opened this issue Nov 1, 2023 · 0 comments · Fixed by #2661
Closed

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

Treggats opened this issue Nov 1, 2023 · 0 comments · Fixed by #2661

Comments

@Treggats
Copy link
Contributor

Treggats commented Nov 1, 2023

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants