mongokit
mongokit copied to clipboard
Can OR operator support something like "[unicode]" type?
with MongoKit v0.7.2:
structure={'foo': OR(unicode,int)}
works, but this won't work:
structure={'foo': OR(unicode,[unicode])}
I have a use case that a field can be either a string (if only one item) or a list of strings (if multiple items). What is the best to describe it in MongoKit?
Thanks.