mongoengine icon indicating copy to clipboard operation
mongoengine copied to clipboard

Adding `SetField`

Open tylerganter opened this issue 5 years ago • 1 comments

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

tylerganter avatar May 27 '20 17:05 tylerganter

bueller?

tylerganter avatar Jun 19 '20 19:06 tylerganter