On Jan 4, 2015, at 4:38 AM, Norbert Hartl <norb...@hartl.name> wrote:
> someCollection select: { > '$or' -> { > { 'name' -> { > '$regex' -> 'test' . > '$options' -> 'i' } asDictionary } asDictionary. > { 'description' -> { > '$regex' -> 'test' . > '$options' -> 'i' } asDictionary } asDictionary > } > } asDictionary That worked. I was close, but I was using $or: instead of $or, and I was missing one level of asDictionary. Just for the archive, there’s one more query I needed, which was to find an object based on it’s object id. I ended up using: voyageId := Integer readFrom: (request at: #voyageId) base: 16. someModel := SomeModel selectOne: { '_id' -> (OID value: voyageId) } asDictionary. This is a web app using Teapot and Mustache, so I write the voyageId out using: self voyageId value printStringHex