Skip to content

Adding SetField - #2337

Open
tylerganter wants to merge 2 commits into
MongoEngine:masterfrom
tylerganter:set-field
Open

Adding SetField#2337
tylerganter wants to merge 2 commits into
MongoEngine:masterfrom
tylerganter:set-field

Conversation

@tylerganter

@tylerganter tylerganter commented May 27, 2020

Copy link
Copy Markdown

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
Copy Markdown
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