original_string: public function getIdValue($object)
      {
          if (!$object) {
              return;
          }
  
          if (!$this->om->contains($object)) {
              throw new RuntimeException(sprintf('Entity of type "%s" passed to the choice field must be managed. Maybe you forget to persist it in the entity manager?', \get_class($object)));
          }
  
          $this->om->initializeObject($object);
  
          $idValue = current($this->classMetadata->getIdentifierValues($object));
  
          if ($this->associationIdReader) {
              $idValue = $this->associationIdReader->getIdValue($idValue);
          }
  
          return $idValue;
      }
code: public function getIdValue($object)
      {
          if (!$object) {
              return;
          }
  
          if (!$this->om->contains($object)) {
              throw new RuntimeException(sprintf('Entity of type "%s" passed to the choice field must be managed. Maybe you forget to persist it in the entity manager?', \get_class($object)));
          }
  
          $this->om->initializeObject($object);
  
          $idValue = current($this->classMetadata->getIdentifierValues($object));
  
          if ($this->associationIdReader) {
              $idValue = $this->associationIdReader->getIdValue($idValue);
          }
  
          return $idValue;
      }
code_tokens: public function getIdValue ( $ object ) { if ( ! $ object ) { return ; } if ( ! $ this -> om -> contains ( $ object ) ) { throw new RuntimeException ( sprintf ( 'Entity of type "%s" passed to the choice field must be managed. Maybe you forget to persist it in the entity manager?' , \ get_class ( $ object ) ) ) ; } $ this -> om -> initializeObject ( $ object ) ; $ idValue = current ( $ this -> classMetadata -> getIdentifierValues ( $ object ) ) ; if ( $ this -> associationIdReader ) { $ idValue = $ this -> associationIdReader -> getIdValue ( $ idValue ) ; } return $ idValue ; }
docstring: Returns the ID value for an object.
  
  This method assumes that the object has a single-column ID.
  
  @param object $object The object
  
  @return mixed The ID value
docstring_tokens: Returns the ID value for an object .