/**
  * Asks the name of the field that completes the bidirectional association on the owning side.
  * The key 'mappedBy' must be specified on the inverse side of a bidirectional association.
  *
  * @param InputInterface    $input
  * @param OutputInterface   $output
  * @param ClassMetadata $metadata
  * @param string            $associationName
  *
  * @return string
  */
 private function askAssociationMappedBy(GeneratorStyle $io, ClassMetadata $metadata, $associationName = null)
 {
     // Get actual field mappedBy based on field name
     // or default value if not set.
     $mappedBy = $metadata->getAssociationMappedBy($associationName) ?: static::DEFAULT_MAPPED_BY;
     // Create new question
     return $io->ask('Mapped by', $mappedBy, function ($answer) {
         //
         return $answer;
     });
 }