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
[3.6.5] Model::find with integer keys no longer works after laravel/framework update (v6.18.36 => v6.18.37) #2087
Comments
Hello, This PR laravel/framework#34031 broke that. Possible solution is to define model key type to int. Well, this is another breaking change in a minor release. What do you think @Smolevich ? |
@EligiusSantori why do you use type string for |
@Smolevich it's being set by default to string here https://github.com/jenssegers/laravel-mongodb/blob/master/src/Jenssegers/Mongodb/Eloquent/Model.php#L38 |
I mean another thing, |
Quite interesting transaction pr also failing https://github.com/jenssegers/laravel-mongodb/pull/1904/checks?check_run_id=1091695716#step:10:22 nothing was changed at all and everything worked like a charm. |
Well, |
Glad it was resolved. Closing. |
Description:
After
composer update
thefind()
method always returns null for collections with integrer_id
.Also there is difference in
\DB::listen
behaviour. In old framework version\DB::listen(function($q) { dump($q->sql); });
shows nothing, in new version it shows"profile.find({"_id":"7016278824"},{"limit":1,"typeMap":{"root":"array","document":"array"}})"
.Steps to reproduce
Expected behaviour
Should return MyModel instance with data.
Actual behaviour
Returns
null
.The text was updated successfully, but these errors were encountered: