Skip to content

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