Doctrine/Subscriber/LdapObjectSubscriber.php
protected function transformValueForDb(LifecycleEventArgs $args)
    {
        $entity = $this->getObjectFromLifeCycleArgs($args);
        $om = $this->getOmFromLifeCycleArgs($args);

        $properties = $this->getLdapObjectAnnotationProperties($entity, $om);
        foreach ($properties as $info) {
            if ($info['property']->getValue($entity)) {
                $this->setLdapValueForProperty($info['property'], $info['annotation'], $entity);
            }
        }
    }
protected function transformValueForDb(LifecycleEventArgs $args)
    {
        $entity = $this->getObjectFromLifeCycleArgs($args);
        $om = $this->getOmFromLifeCycleArgs($args);

        $properties = $this->getLdapObjectAnnotationProperties($entity, $om);
        foreach ($properties as $info) {
            if ($info['property']->getValue($entity)) {
                $this->setLdapValueForProperty($info['property'], $info['annotation'], $entity);
            }
        }
    }
Handles transforming the value as it currently is to the value the DB expects.

@param LifecycleEventArgs $args