a-musing-moose/morph — Issue #26: Using '$or' criteria
Author: russellseymour
Created: 2012-01-17 11:39:57+00:00
State: open

Hello again,

I am trying to run an '$or' query with Morph. However although the query seems ok (by using getRawQuery) and can be executed against Mongo from the command line, I do not seem to be getting any results back from Morph.

I am using the following construct:

```$query -> property('$or') -> equals(array(array('name' => 'layout)))```

When I JSON encode the '$query -> getRawQuery()' I get the following:

```{"$or":[{"name":"layout_www"}]}```

This JSON snippet returns the expected result when I use the MongoDB command line. However I do not get anything back in my object from Morph.

Is it possible to use '$or' with Morph? If so is this the correct way of doing it? If not is there a way to perform an '$or' query using Morph?

Thanks for your quick responses and help with my queries. It is very much appreciated.

Russell