8000 Adding `SetField` by tylerganter · Pull Request #2337 · MongoEngine/mongoengine · GitHub
[go: up one dir, main page]

Skip to content

Conversation

tylerganter
Copy link
@tylerganter tylerganter commented May 27, 2020

SetField inherits from ListField and is represented as a list on the database side of things. The differences from ListField are that instead of containing a BaseList object, a document's field contains a BaseSet object.

A SetField can be assigned a list or tuple, but will be cast as a set.

In order to make sets stored to the database deterministic, sets are stored as sorted lists.

I have not changed the documentation. If everything seems good I'll make the effort.

  • support for SetField
  • tests
  • documentation

Closes #2336

@tylerganter
Copy link
Author

bueller?

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.

Support for SetField

1 participant

0