public function testWhereFieldExists()
{
// create new document
$document = $this->collection->createDocument(array('fieldName' => '1'));
$document->save();
$documentId = $document->getId();
// scalar value
$this->assertEmpty($this->collection->find()->whereExists('unexistedFieldName')->findOne());
$this->assertEquals($documentId, $this->collection->find()->whereExists('fieldName')->findOne()->getId());
}