Skip to content

Fix truncate on models #1949

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

Merged
merged 2 commits into from
Feb 8, 2020
Merged

Conversation

divine
Copy link
Contributor

@divine divine commented Feb 8, 2020

According to docs array or object might be returned on drop, so we need to add options.

See https://docs.mongodb.com/php-library/v1.5/reference/method/MongoDBCollection-drop

Related issue: #1948

However, not sure about $this->assertEquals(1, $result); since truncate actually returns void https://github.com/laravel/framework/blob/6.x/src/Illuminate/Database/Query/Builder.php#L2804

Closes #1948

@divine divine mentioned this pull request Feb 8, 2020
@Smolevich Smolevich merged commit 79cb569 into mongodb:master Feb 8, 2020
@divine divine deleted the fix_truncate_on_models branch February 10, 2020 19:34
mnphpexpert added a commit to mnphpexpert/laravel-mongodb that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Model::truncate fails
3 participants