model id property returns the builder and not the id
Treggats opened this issue · comments
Tonko Mulder commented
- 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
- Laravel app version 10.30.0
- create connection / model which uses Mongo as backend
$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.