public function transform($collection)
    {
        if (null === $collection) {
            return null;
        }

        if (!($collection instanceof Collection)) {
            throw new UnexpectedTypeException($collection, 'Doctrine\Common\Collection\Collection');
        }

        $results = array();
        foreach ($collection as $entity) {
            $results[] = $this->accessor->getValue($entity, $this->identifier);
        }

        //Here, do not put the result in the cache because we must check the value in
        //reverseTransform (by QueryBuilder)

        return $results;
    }