namlook/mongokit — Issue #69: Can OR operator support something like "[unicode]" type?
Author: newgene
Created: 2011-12-14 01:14:55+00:00
State: open

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.