Removed filtering of null values in transformer

This commit is contained in:
Richard Miller 2012-02-27 19:37:59 +00:00
commit 2e5bac1f52
2 changed files with 4 additions and 8 deletions

View file

@ -49,9 +49,7 @@ class ModelToElasticaAutoTransformer implements ModelToElasticaTransformerInterf
if (!method_exists($class, $getter)) {
throw new RuntimeException(sprintf('The getter %s::%s does not exist', $class, $getter));
}
if (null !== $value = $this->normalizeValue($object->$getter())) {
$array[$key] = $value;
}
$array[$key] = $this->normalizeValue($object->$getter());
}
$identifierGetter = 'get'.ucfirst($this->options['identifier']);
$identifier = $object->$identifierGetter();