public function testRelationNull()
 {
     $org = $this->em->getRepository('\\OpenLdapObject\\Tests\\Manager\\Organisation')->find('bad');
     $this->assertEquals($org->getMember()[1], false);
     $org->removeMember(false);
     $this->em->persist($org);
     $this->em->flush();
     $this->em->getClient()->update($org->_getDn(), array('member' => array($org->getMember()[0]->_getDn(), 'uid=youdi,ou=people,dc=example,dc=com')));
 }
 private function getNewDn($entity, $currentData, EntityAnalyzer $analyzer)
 {
     $index = $analyzer->getIndex();
     if ($index === false) {
         throw new InflushableException('Entity ' . get_class($entity) . 'have no index');
     }
     $dnPiece = array();
     $dnPiece[] = $index . '=' . $currentData[$index];
     if (is_string($analyzer->getBaseDn())) {
         $dnPiece[] = $analyzer->getBaseDn();
     }
     if (is_string($this->em->getClient()->getBaseDn())) {
         $dnPiece[] = $this->em->getClient()->getBaseDn();
     }
     return implode(',', $dnPiece);
 }