title: How to validate Entity form field using yml in Symfony2?
body: <p>I got following error message when I tried to validate entity type form filed using validation.yml file</p>
  
  <p>Catchable Fatal Error: Argument 1 passed to Frontend\EntityBundle\Entity\StudentRegistration::setIdState() must be an instance of Frontend\EntityBundle\Entity\MasterState, null given, called in C:\wamp\www\careerguide\vendor\symfony\src\Symfony\Component\Form\Util\PropertyPath.php on line 347 and defined in C:\wamp\www\careerguide\src\Frontend\EntityBundle\Entity\StudentRegistration.php line 1099</p>
  
  <p>in form,</p>
  
  <p>->add('idState', 'entity', array('class' => 'Frontend\EntityBundle\Entity\MasterState', 'property' => 'stateName', 'empty_value' => 'Select State', 'label' => 'State :', 'attr' => array('class' => 'width275'), 'required' => false))</p>
  
  <p>In entity,</p>
  
  <pre><code> &lt;?php
  </code></pre>
  
  <p>namespace Frontend\EntityBundle\Entity;</p>
  
  <p>use Doctrine\ORM\Mapping as ORM;</p>
  
  <p>/**
   * Frontend\EntityBundle\Entity\StudentRegistration
   *
   * @ORM\Table(name="student_registration")
   * @ORM\Entity
   <em>/
  class StudentRegistration
  {
      /</em>*
       * @var integer $id
       *
       * @ORM\Column(name="id", type="integer", nullable=false)
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="IDENTITY")
       */
      private $id;</p>
  
  <pre><code>/**
   * @var string $idStudentRegistration
   *
   * @ORM\Column(name="id_student_registration", type="string", length=128, nullable=false)
   */
  private $idStudentRegistration;
  
  /**
   * @var integer $idAttempt
   *
   * @ORM\Column(name="id_attempt", type="integer", nullable=true)
   */
  private $idAttempt;
  
  /**
   * @var string $firstName
   *
   * @ORM\Column(name="first_name", type="string", length=128, nullable=false)
   */
  private $firstName;
  
  /**
   * @var string $lastName
   *
   * @ORM\Column(name="last_name", type="string", length=128, nullable=true)
   */
  private $lastName;
  
  /**
   * @var datetime $dateOfBirth
   *
   * @ORM\Column(name="date_of_birth", type="datetime", nullable=true)
   */
  private $dateOfBirth;
  
  /**
   * @var string $gender
   *
   * @ORM\Column(name="gender", type="string", length=16, nullable=true)
   */
  private $gender;
  
  /**
   * @var string $email
   *
   * @ORM\Column(name="email", type="string", length=128, nullable=true)
   */
  private $email;
  
  /**
   * @var string $password
   *
   * @ORM\Column(name="password", type="string", length=128, nullable=true)
   */
  private $password;
  
  /**
   * @var string $mobileNumber
   *
   * @ORM\Column(name="mobile_number", type="string", length=16, nullable=true)
   */
  private $mobileNumber;
  
  /**
   * @var string $stdCode
   *
   * @ORM\Column(name="std_code", type="string", length=16, nullable=true)
   */
  private $stdCode;
  
  /**
   * @var integer $landlineNumber
   *
   * @ORM\Column(name="landline_number", type="integer", nullable=true)
   */
  private $landlineNumber;
  
  /**
   * @var text $address
   *
   * @ORM\Column(name="address", type="text", nullable=true)
   */
  private $address;
  
  /**
   * @var integer $pincode
   *
   * @ORM\Column(name="pincode", type="integer", nullable=true)
   */
  private $pincode;
  
  /**
   * @var string $disabilityPercentage
   *
   * @ORM\Column(name="disability_percentage", type="string", length=16, nullable=true)
   */
  private $disabilityPercentage;
  
  /**
   * @var string $schoolName
   *
   * @ORM\Column(name="school_name", type="string", length=256, nullable=true)
   */
  private $schoolName;
  
  /**
   * @var string $collegeName
   *
   * @ORM\Column(name="college_name", type="string", length=256, nullable=true)
   */
  private $collegeName;
  
  /**
   * @var string $qualificationStatus
   *
   * @ORM\Column(name="qualification_status", type="string", length=128, nullable=true)
   */
  private $qualificationStatus;
  
  /**
   * @var string $courseDuration
   *
   * @ORM\Column(name="course_duration", type="string", length=16, nullable=true)
   */
  private $courseDuration;
  
  /**
   * @var string $workExposure
   *
   * @ORM\Column(name="work_exposure", type="string", length=16, nullable=true)
   */
  private $workExposure;
  
  /**
   * @var string $userStudyDuration
   *
   * @ORM\Column(name="user_study_duration", type="string", length=16, nullable=true)
   */
  private $userStudyDuration;
  
  /**
   * @var text $achievements
   *
   * @ORM\Column(name="achievements", type="text", nullable=true)
   */
  private $achievements;
  
  /**
   * @var datetime $createdAt
   *
   * @ORM\Column(name="created_at", type="datetime", nullable=true)
   */
  private $createdAt;
  
  /**
   * @var datetime $updatedAt
   *
   * @ORM\Column(name="updated_at", type="datetime", nullable=true)
   */
  private $updatedAt;
  
  /**
   * @var integer $version
   *
   * @ORM\Column(name="version", type="integer", nullable=true)
   */
  private $version;
  
  /**
   * @var MasterCity
   *
   * @ORM\ManyToOne(targetEntity="MasterCity")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_city", referencedColumnName="id")
   * })
   */
  private $idCity;
  
  /**
   * @var MasterStreamgroup
   *
   * @ORM\ManyToOne(targetEntity="MasterStreamgroup")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_streamgroup", referencedColumnName="id")
   * })
   */
  private $idStreamgroup;
  
  /**
   * @var MasterQualification
   *
   * @ORM\ManyToOne(targetEntity="MasterQualification")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_qualification_father", referencedColumnName="id")
   * })
   */
  private $idQualificationFather;
  
  /**
   * @var MasterOccupation
   *
   * @ORM\ManyToOne(targetEntity="MasterOccupation")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_occupation_father", referencedColumnName="id")
   * })
   */
  private $idOccupationFather;
  
  /**
   * @var MasterQualification
   *
   * @ORM\ManyToOne(targetEntity="MasterQualification")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_qualification_mother", referencedColumnName="id")
   * })
   */
  private $idQualificationMother;
  
  /**
   * @var MasterOccupation
   *
   * @ORM\ManyToOne(targetEntity="MasterOccupation")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_occupation_mother", referencedColumnName="id")
   * })
   */
  private $idOccupationMother;
  
  /**
   * @var MasterCity
   *
   * @ORM\ManyToOne(targetEntity="MasterCity")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_preferred_city1", referencedColumnName="id")
   * })
   */
  private $idPreferredCity1;
  
  /**
   * @var MasterCity
   *
   * @ORM\ManyToOne(targetEntity="MasterCity")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_preferred_city2", referencedColumnName="id")
   * })
   */
  private $idPreferredCity2;
  
  /**
   * @var MasterCity
   *
   * @ORM\ManyToOne(targetEntity="MasterCity")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_preferred_city3", referencedColumnName="id")
   * })
   */
  private $idPreferredCity3;
  
  /**
   * @var MasterBudget
   *
   * @ORM\ManyToOne(targetEntity="MasterBudget")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_budget", referencedColumnName="id")
   * })
   */
  private $idBudget;
  
  /**
   * @var MasterMode
   *
   * @ORM\ManyToOne(targetEntity="MasterMode")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_mode", referencedColumnName="id")
   * })
   */
  private $idMode;
  
  /**
   * @var MasterState
   *
   * @ORM\ManyToOne(targetEntity="MasterState")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_state", referencedColumnName="id")
   * })
   */
  private $idState;
  
  /**
   * @var MasterCountry
   *
   * @ORM\ManyToOne(targetEntity="MasterCountry")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_country", referencedColumnName="id")
   * })
   */
  private $idCountry;
  
  /**
   * @var MasterHealth
   *
   * @ORM\ManyToOne(targetEntity="MasterHealth")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_health", referencedColumnName="id")
   * })
   */
  private $idHealth;
  
  /**
   * @var MasterQualification
   *
   * @ORM\ManyToOne(targetEntity="MasterQualification")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_qualification", referencedColumnName="id")
   * })
   */
  private $idQualification;
  
  /**
   * @var MasterMedium
   *
   * @ORM\ManyToOne(targetEntity="MasterMedium")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_medium", referencedColumnName="id")
   * })
   */
  private $idMedium;
  
  /**
   * @var MasterBoard
   *
   * @ORM\ManyToOne(targetEntity="MasterBoard")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_board", referencedColumnName="id")
   * })
   */
  private $idBoard;
  
  /**
   * @var MasterUniversity
   *
   * @ORM\ManyToOne(targetEntity="MasterUniversity")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_university", referencedColumnName="id")
   * })
   */
  private $idUniversity;
  
  /**
   * @var MasterStream
   *
   * @ORM\ManyToOne(targetEntity="MasterStream")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_stream", referencedColumnName="id")
   * })
   */
  private $idStream;
  
  
  
  /**
   * Get id
   *
   * @return integer
   */
  public function getId()
  {
      return $this-&gt;id;
  }
  
  /**
   * Set idStudentRegistration
   *
   * @param string $idStudentRegistration
   */
  public function setIdStudentRegistration($idStudentRegistration)
  {
      $this-&gt;idStudentRegistration = $idStudentRegistration;
  }
  
  /**
   * Get idStudentRegistration
   *
   * @return string
   */
  public function getIdStudentRegistration()
  {
      return $this-&gt;idStudentRegistration;
  }
  
  /**
   * Set idAttempt
   *
   * @param integer $idAttempt
   */
  public function setIdAttempt($idAttempt)
  {
      $this-&gt;idAttempt = $idAttempt;
  }
  
  /**
   * Get idAttempt
   *
   * @return integer
   */
  public function getIdAttempt()
  {
      return $this-&gt;idAttempt;
  }
  
  /**
   * Set firstName
   *
   * @param string $firstName
   */
  public function setFirstName($firstName)
  {
      $this-&gt;firstName = $firstName;
  }
  
  /**
   * Get firstName
   *
   * @return string
   */
  public function getFirstName()
  {
      return $this-&gt;firstName;
  }
  
  /**
   * Set lastName
   *
   * @param string $lastName
   */
  public function setLastName($lastName)
  {
      $this-&gt;lastName = $lastName;
  }
  
  /**
   * Get lastName
   *
   * @return string
   */
  public function getLastName()
  {
      return $this-&gt;lastName;
  }
  
  /**
   * Set dateOfBirth
   *
   * @param datetime $dateOfBirth
   */
  public function setDateOfBirth($dateOfBirth)
  {
      $this-&gt;dateOfBirth = $dateOfBirth;
  }
  
  /**
   * Get dateOfBirth
   *
   * @return datetime
   */
  public function getDateOfBirth()
  {
      return $this-&gt;dateOfBirth;
  }
  
  /**
   * Set gender
   *
   * @param string $gender
   */
  public function setGender($gender)
  {
      $this-&gt;gender = $gender;
  }
  
  /**
   * Get gender
   *
   * @return string
   */
  public function getGender()
  {
      return $this-&gt;gender;
  }
  
  /**
   * Set email
   *
   * @param string $email
   */
  public function setEmail($email)
  {
      $this-&gt;email = $email;
  }
  
  /**
   * Get email
   *
   * @return string
   */
  public function getEmail()
  {
      return $this-&gt;email;
  }
  
  /**
   * Set password
   *
   * @param string $password
   */
  public function setPassword($password)
  {
      $this-&gt;password = $password;
  }
  
  /**
   * Get password
   *
   * @return string
   */
  public function getPassword()
  {
      return $this-&gt;password;
  }
  
  /**
   * Set mobileNumber
   *
   * @param string $mobileNumber
   */
  public function setMobileNumber($mobileNumber)
  {
      $this-&gt;mobileNumber = $mobileNumber;
  }
  
  /**
   * Get mobileNumber
   *
   * @return string
   */
  public function getMobileNumber()
  {
      return $this-&gt;mobileNumber;
  }
  
  /**
   * Set stdCode
   *
   * @param string $stdCode
   */
  public function setStdCode($stdCode)
  {
      $this-&gt;stdCode = $stdCode;
  }
  
  /**
   * Get stdCode
   *
   * @return string
   */
  public function getStdCode()
  {
      return $this-&gt;stdCode;
  }
  
  /**
   * Set landlineNumber
   *
   * @param integer $landlineNumber
   */
  public function setLandlineNumber($landlineNumber)
  {
      $this-&gt;landlineNumber = $landlineNumber;
  }
  
  /**
   * Get landlineNumber
   *
   * @return integer
   */
  public function getLandlineNumber()
  {
      return $this-&gt;landlineNumber;
  }
  
  /**
   * Set address
   *
   * @param text $address
   */
  public function setAddress($address)
  {
      $this-&gt;address = $address;
  }
  
  /**
   * Get address
   *
   * @return text
   */
  public function getAddress()
  {
      return $this-&gt;address;
  }
  
  /**
   * Set pincode
   *
   * @param integer $pincode
   */
  public function setPincode($pincode)
  {
      $this-&gt;pincode = $pincode;
  }
  
  /**
   * Get pincode
   *
   * @return integer
   */
  public function getPincode()
  {
      return $this-&gt;pincode;
  }
  
  /**
   * Set disabilityPercentage
   *
   * @param string $disabilityPercentage
   */
  public function setDisabilityPercentage($disabilityPercentage)
  {
      $this-&gt;disabilityPercentage = $disabilityPercentage;
  }
  
  /**
   * Get disabilityPercentage
   *
   * @return string
   */
  public function getDisabilityPercentage()
  {
      return $this-&gt;disabilityPercentage;
  }
  
  /**
   * Set schoolName
   *
   * @param string $schoolName
   */
  public function setSchoolName($schoolName)
  {
      $this-&gt;schoolName = $schoolName;
  }
  
  /**
   * Get schoolName
   *
   * @return string
   */
  public function getSchoolName()
  {
      return $this-&gt;schoolName;
  }
  
  /**
   * Set collegeName
   *
   * @param string $collegeName
   */
  public function setCollegeName($collegeName)
  {
      $this-&gt;collegeName = $collegeName;
  }
  
  /**
   * Get collegeName
   *
   * @return string
   */
  public function getCollegeName()
  {
      return $this-&gt;collegeName;
  }
  
  /**
   * Set qualificationStatus
   *
   * @param string $qualificationStatus
   */
  public function setQualificationStatus($qualificationStatus)
  {
      $this-&gt;qualificationStatus = $qualificationStatus;
  }
  
  /**
   * Get qualificationStatus
   *
   * @return string
   */
  public function getQualificationStatus()
  {
      return $this-&gt;qualificationStatus;
  }
  
  /**
   * Set courseDuration
   *
   * @param string $courseDuration
   */
  public function setCourseDuration($courseDuration)
  {
      $this-&gt;courseDuration = $courseDuration;
  }
  
  /**
   * Get courseDuration
   *
   * @return string
   */
  public function getCourseDuration()
  {
      return $this-&gt;courseDuration;
  }
  
  /**
   * Set workExposure
   *
   * @param string $workExposure
   */
  public function setWorkExposure($workExposure)
  {
      $this-&gt;workExposure = $workExposure;
  }
  
  /**
   * Get workExposure
   *
   * @return string
   */
  public function getWorkExposure()
  {
      return $this-&gt;workExposure;
  }
  
  /**
   * Set userStudyDuration
   *
   * @param string $userStudyDuration
   */
  public function setUserStudyDuration($userStudyDuration)
  {
      $this-&gt;userStudyDuration = $userStudyDuration;
  }
  
  /**
   * Get userStudyDuration
   *
   * @return string
   */
  public function getUserStudyDuration()
  {
      return $this-&gt;userStudyDuration;
  }
  
  /**
   * Set achievements
   *
   * @param text $achievements
   */
  public function setAchievements($achievements)
  {
      $this-&gt;achievements = $achievements;
  }
  
  /**
   * Get achievements
   *
   * @return text
   */
  public function getAchievements()
  {
      return $this-&gt;achievements;
  }
  
  /**
   * Set createdAt
   *
   * @param datetime $createdAt
   */
  public function setCreatedAt($createdAt)
  {
      $this-&gt;createdAt = $createdAt;
  }
  
  /**
   * Get createdAt
   *
   * @return datetime
   */
  public function getCreatedAt()
  {
      return $this-&gt;createdAt;
  }
  
  /**
   * Set updatedAt
   *
   * @param datetime $updatedAt
   */
  public function setUpdatedAt($updatedAt)
  {
      $this-&gt;updatedAt = $updatedAt;
  }
  
  /**
   * Get updatedAt
   *
   * @return datetime
   */
  public function getUpdatedAt()
  {
      return $this-&gt;updatedAt;
  }
  
  /**
   * Set version
   *
   * @param integer $version
   */
  public function setVersion($version)
  {
      $this-&gt;version = $version;
  }
  
  /**
   * Get version
   *
   * @return integer
   */
  public function getVersion()
  {
      return $this-&gt;version;
  }
  
  /**
   * Set idCity
   *
   * @param Frontend\EntityBundle\Entity\MasterCity $idCity
   */
  public function setIdCity(\Frontend\EntityBundle\Entity\MasterCity $idCity)
  {
      $this-&gt;idCity = $idCity;
  }
  
  /**
   * Get idCity
   *
   * @return Frontend\EntityBundle\Entity\MasterCity
   */
  public function getIdCity()
  {
      return $this-&gt;idCity;
  }
  
  /**
   * Set idStreamgroup
   *
   * @param Frontend\EntityBundle\Entity\MasterStreamgroup $idStreamgroup
   */
  public function setIdStreamgroup(\Frontend\EntityBundle\Entity\MasterStreamgroup $idStreamgroup)
  {
      $this-&gt;idStreamgroup = $idStreamgroup;
  }
  
  /**
   * Get idStreamgroup
   *
   * @return Frontend\EntityBundle\Entity\MasterStreamgroup
   */
  public function getIdStreamgroup()
  {
      return $this-&gt;idStreamgroup;
  }
  
  /**
   * Set idQualificationFather
   *
   * @param Frontend\EntityBundle\Entity\MasterQualification $idQualificationFather
   */
  public function setIdQualificationFather(\Frontend\EntityBundle\Entity\MasterQualification $idQualificationFather)
  {
      $this-&gt;idQualificationFather = $idQualificationFather;
  }
  
  /**
   * Get idQualificationFather
   *
   * @return Frontend\EntityBundle\Entity\MasterQualification
   */
  public function getIdQualificationFather()
  {
      return $this-&gt;idQualificationFather;
  }
  
  /**
   * Set idOccupationFather
   *
   * @param Frontend\EntityBundle\Entity\MasterOccupation $idOccupationFather
   */
  public function setIdOccupationFather(\Frontend\EntityBundle\Entity\MasterOccupation $idOccupationFather)
  {
      $this-&gt;idOccupationFather = $idOccupationFather;
  }
  
  /**
   * Get idOccupationFather
   *
   * @return Frontend\EntityBundle\Entity\MasterOccupation
   */
  public function getIdOccupationFather()
  {
      return $this-&gt;idOccupationFather;
  }
  
  /**
   * Set idQualificationMother
   *
   * @param Frontend\EntityBundle\Entity\MasterQualification $idQualificationMother
   */
  public function setIdQualificationMother(\Frontend\EntityBundle\Entity\MasterQualification $idQualificationMother)
  {
      $this-&gt;idQualificationMother = $idQualificationMother;
  }
  
  /**
   * Get idQualificationMother
   *
   * @return Frontend\EntityBundle\Entity\MasterQualification
   */
  public function getIdQualificationMother()
  {
      return $this-&gt;idQualificationMother;
  }
  
  /**
   * Set idOccupationMother
   *
   * @param Frontend\EntityBundle\Entity\MasterOccupation $idOccupationMother
   */
  public function setIdOccupationMother(\Frontend\EntityBundle\Entity\MasterOccupation $idOccupationMother)
  {
      $this-&gt;idOccupationMother = $idOccupationMother;
  }
  
  /**
   * Get idOccupationMother
   *
   * @return Frontend\EntityBundle\Entity\MasterOccupation
   */
  public function getIdOccupationMother()
  {
      return $this-&gt;idOccupationMother;
  }
  
  /**
   * Set idPreferredCity1
   *
   * @param Frontend\EntityBundle\Entity\MasterCity $idPreferredCity1
   */
  public function setIdPreferredCity1(\Frontend\EntityBundle\Entity\MasterCity $idPreferredCity1)
  {
      $this-&gt;idPreferredCity1 = $idPreferredCity1;
  }
  
  /**
   * Get idPreferredCity1
   *
   * @return Frontend\EntityBundle\Entity\MasterCity
   */
  public function getIdPreferredCity1()
  {
      return $this-&gt;idPreferredCity1;
  }
  
  /**
   * Set idPreferredCity2
   *
   * @param Frontend\EntityBundle\Entity\MasterCity $idPreferredCity2
   */
  public function setIdPreferredCity2(\Frontend\EntityBundle\Entity\MasterCity $idPreferredCity2)
  {
      $this-&gt;idPreferredCity2 = $idPreferredCity2;
  }
  
  /**
   * Get idPreferredCity2
   *
   * @return Frontend\EntityBundle\Entity\MasterCity
   */
  public function getIdPreferredCity2()
  {
      return $this-&gt;idPreferredCity2;
  }
  
  /**
   * Set idPreferredCity3
   *
   * @param Frontend\EntityBundle\Entity\MasterCity $idPreferredCity3
   */
  public function setIdPreferredCity3(\Frontend\EntityBundle\Entity\MasterCity $idPreferredCity3)
  {
      $this-&gt;idPreferredCity3 = $idPreferredCity3;
  }
  
  /**
   * Get idPreferredCity3
   *
   * @return Frontend\EntityBundle\Entity\MasterCity
   */
  public function getIdPreferredCity3()
  {
      return $this-&gt;idPreferredCity3;
  }
  
  /**
   * Set idBudget
   *
   * @param Frontend\EntityBundle\Entity\MasterBudget $idBudget
   */
  public function setIdBudget(\Frontend\EntityBundle\Entity\MasterBudget $idBudget)
  {
      $this-&gt;idBudget = $idBudget;
  }
  
  /**
   * Get idBudget
   *
   * @return Frontend\EntityBundle\Entity\MasterBudget
   */
  public function getIdBudget()
  {
      return $this-&gt;idBudget;
  }
  
  /**
   * Set idMode
   *
   * @param Frontend\EntityBundle\Entity\MasterMode $idMode
   */
  public function setIdMode(\Frontend\EntityBundle\Entity\MasterMode $idMode)
  {
      $this-&gt;idMode = $idMode;
  }
  
  /**
   * Get idMode
   *
   * @return Frontend\EntityBundle\Entity\MasterMode
   */
  public function getIdMode()
  {
      return $this-&gt;idMode;
  }
  
  /**
   * Set idState
   *
   * @param Frontend\EntityBundle\Entity\MasterState $idState
   */
  public function setIdState(\Frontend\EntityBundle\Entity\MasterState $idState)
  {
      $this-&gt;idState = $idState;
  }
  
  /**
   * Get idState
   *
   * @return Frontend\EntityBundle\Entity\MasterState
   */
  public function getIdState()
  {
      return $this-&gt;idState;
  }
  
  /**
   * Set idCountry
   *
   * @param Frontend\EntityBundle\Entity\MasterCountry $idCountry
   */
  public function setIdCountry(\Frontend\EntityBundle\Entity\MasterCountry $idCountry)
  {
      $this-&gt;idCountry = $idCountry;
  }
  
  /**
   * Get idCountry
   *
   * @return Frontend\EntityBundle\Entity\MasterCountry
   */
  public function getIdCountry()
  {
      return $this-&gt;idCountry;
  }
  
  /**
   * Set idHealth
   *
   * @param Frontend\EntityBundle\Entity\MasterHealth $idHealth
   */
  public function setIdHealth(\Frontend\EntityBundle\Entity\MasterHealth $idHealth)
  {
      $this-&gt;idHealth = $idHealth;
  }
  
  /**
   * Get idHealth
   *
   * @return Frontend\EntityBundle\Entity\MasterHealth
   */
  public function getIdHealth()
  {
      return $this-&gt;idHealth;
  }
  
  /**
   * Set idQualification
   *
   * @param Frontend\EntityBundle\Entity\MasterQualification $idQualification
   */
  public function setIdQualification(\Frontend\EntityBundle\Entity\MasterQualification $idQualification)
  {
      $this-&gt;idQualification = $idQualification;
  }
  
  /**
   * Get idQualification
   *
   * @return Frontend\EntityBundle\Entity\MasterQualification
   */
  public function getIdQualification()
  {
      return $this-&gt;idQualification;
  }
  
  /**
   * Set idMedium
   *
   * @param Frontend\EntityBundle\Entity\MasterMedium $idMedium
   */
  public function setIdMedium(\Frontend\EntityBundle\Entity\MasterMedium $idMedium)
  {
      $this-&gt;idMedium = $idMedium;
  }
  
  /**
   * Get idMedium
   *
   * @return Frontend\EntityBundle\Entity\MasterMedium
   */
  public function getIdMedium()
  {
      return $this-&gt;idMedium;
  }
  
  /**
   * Set idBoard
   *
   * @param Frontend\EntityBundle\Entity\MasterBoard $idBoard
   */
  public function setIdBoard(\Frontend\EntityBundle\Entity\MasterBoard $idBoard)
  {
      $this-&gt;idBoard = $idBoard;
  }
  
  /**
   * Get idBoard
   *
   * @return Frontend\EntityBundle\Entity\MasterBoard
   */
  public function getIdBoard()
  {
      return $this-&gt;idBoard;
  }
  
  /**
   * Set idUniversity
   *
   * @param Frontend\EntityBundle\Entity\MasterUniversity $idUniversity
   */
  public function setIdUniversity(\Frontend\EntityBundle\Entity\MasterUniversity $idUniversity)
  {
      $this-&gt;idUniversity = $idUniversity;
  }
  
  /**
   * Get idUniversity
   *
   * @return Frontend\EntityBundle\Entity\MasterUniversity
   */
  public function getIdUniversity()
  {
      return $this-&gt;idUniversity;
  }
  
  /**
   * Set idStream
   *
   * @param Frontend\EntityBundle\Entity\MasterStream $idStream
   */
  public function setIdStream(\Frontend\EntityBundle\Entity\MasterStream $idStream)
  {
      $this-&gt;idStream = $idStream;
  }
  
  /**
   * Get idStream
   *
   * @return Frontend\EntityBundle\Entity\MasterStream
   */
  public function getIdStream()
  {
      return $this-&gt;idStream;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>and in validation.yml</p>
  
  <p>idState:
     - NotBlank: { message: "Please select state.", groups: [ personalDetails ] }</p>