Skip to content

Conversation

@deignacio
Copy link

Note that drop_collection is not modified since there is no
guarantee that a GridFS collection holds files for only one
Document class. Otherwise you could drop files for other fields
or documents accidentally.

Note that drop_collection is not modified since there is no
guarantee that a GridFS collection holds files for only one
Document class.  Otherwise you could drop files for other fields
or documents accidentally.
@deignacio
Copy link
Author

I have a similar patch that does a db.drop_collection() on the .files and .chunks collections for proxies, but I couldn't come up with a good way to guarantee that the collection was unique to a single field and wouldn't take out any other documents. I guess I could start a new issue if people want to talk about this, otherwise people will leak files if they drop_collection().

rozza referenced this pull request in MongoEngine/mongoengine May 9, 2012
@rozza rozza merged commit e07ecc5 into hmarr:master May 9, 2012
@rozza
Copy link

rozza commented May 9, 2012

Thanks for the patch! It'll be in 0.6.8 due end of play today :)

@flisky
Copy link

flisky commented May 10, 2012

It fails when a FileField is in an EmbeddedDocument because EmbeddedDocument lacks of 'register_proxy_field' method.

@deignacio
Copy link
Author

Great catch! See #496

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants