public function isEmpty()
{
$doNoCount = array();
foreach ($this->_data as $property => $value) {
if ($value instanceof Shanty_Mongo_Document) {
if (!$value->isEmpty()) {
return false;
}
} elseif (!is_null($value)) {
return false;
}
$doNoCount[] = $property;
}
foreach ($this->_cleanData as $property => $value) {
if (in_array($property, $doNoCount)) {
continue;
}
if (!is_null($value)) {
return false;
}
}
return true;
}