Example #1
0
    public function testProperty()
    {
        $expected = array('bob' => 'hoskins');
        $query = new Query();
        $query->property('bob')->equals('hoskins');
        $this->assertEquals($expected, $query->getRawQuery());

    }
Example #2
0
 /**
  * Returns all objects with an _id in $ids
  *
  * By default Morph sets the id to be an instance of MongoId().  When searching you need
  * to ensure you do the same by wrapping your id string in a MongoId object
  *
  * @param Morph\\Object $object
  * @param array $Ids
  * @return Morph\\Iterator
  */
 public function fetchByIds(Object $object, array $ids)
 {
     $query = new Query();
     $query->property('_id')->in($ids);
     return $this->findByQuery($object, $query);
 }