mongoengine
mongoengine copied to clipboard
Adding `SetField`
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.
- [X] support for
SetField - [X] tests
- [ ] documentation
Closes #2336
bueller?