public function contains($fieldName)
{
if (array_key_exists($fieldName, $this->_data)) {
// this also returns true if the field is a Doctrine_Null.
// imho this is not correct behavior.
return true;
}
if (isset($this->_id[$fieldName])) {
return true;
}
if (isset($this->_values[$fieldName])) {
return true;
}
if (isset($this->_references[$fieldName]) && $this->_references[$fieldName] !== self::$_null) {
return true;
}
return false;
}