public function up(Schema $schema)
 {
     // Add ukrainian language
     $language = new Language(67, 'Ukrainian');
     $language->setCode('UA');
     $this->em->persist($language);
     $this->em->flush();
     // Create religion priority
     $table = $schema->getTable('user_religion');
     $table->addColumn('priority', 'integer');
 }
 public function up(Schema $schema)
 {
     $eye = new EyeColor();
     $eye->setName($this->value);
     $this->em->persist($eye);
     $hair = new HairColor();
     $hair->setName($this->value);
     $this->em->persist($hair);
     $smoking = new Smoking();
     $smoking->setName($this->value);
     $this->em->persist($smoking);
     $drinking = new Drinking();
     $drinking->setName($this->value);
     $this->em->persist($drinking);
     $income = new Income();
     $income->setName($this->value);
     $this->em->persist($income);
     $education = new Education();
     $education->setName($this->value);
     $this->em->persist($education);
     $profession = new Profession();
     $profession->setName($this->value);
     $this->em->persist($profession);
     $haveChildren = new HaveChildren();
     $haveChildren->setName($this->value);
     $this->em->persist($haveChildren);
     $livesWithChildren = new LivesWithChildren();
     $livesWithChildren->setName($this->value);
     $this->em->persist($livesWithChildren);
     $religion = new Religion();
     $religion->setName($this->value);
     $religion->setPriority(1);
     $this->em->persist($religion);
     $ethnicity = new Ethnicity();
     $ethnicity->setName($this->value);
     $this->em->persist($ethnicity);
     $zodiac = new Zodiac();
     $zodiac->setName($this->value);
     $this->em->persist($zodiac);
     $language = new Language(68, 'Romanian');
     $language->setCode('RO');
     $this->em->persist($language);
     $this->em->flush();
 }
 public function up(Schema $schema)
 {
     $profession = new Profession();
     $profession->setName("Other");
     $this->em->persist($profession);
     $language = new Language(69, 'Norwegian');
     $language->setCode('NO');
     $this->em->persist($language);
     $this->em->flush();
     $repoLanguage = $this->em->getRepository('ConnectionCoreBundle:Language');
     $language = $repoLanguage->findOneBy(array('name' => "English"));
     $language->setPriority(18);
     $this->em->persist($language);
     $language = $repoLanguage->findOneBy(array('name' => "Russian"));
     $language->setPriority(17);
     $this->em->persist($language);
     $language = $repoLanguage->findOneBy(array('name' => "Spanish"));
     $language->setPriority(16);
     $this->em->persist($language);
     $language = $repoLanguage->findOneBy(array('name' => "Hebrew"));
     $language->setPriority(15);
     $this->em->persist($language);
     $language = $repoLanguage->findOneBy(array('name' => "French"));
     $language->setPriority(14);
     $this->em->persist($language);
     $language = $repoLanguage->findOneBy(array('name' => "Romanian"));
     $language->setPriority(13);
     $this->em->persist($language);
     $language = $repoLanguage->findOneBy(array('name' => "Italian"));
     $language->setPriority(12);
     $this->em->persist($language);
     $language = $repoLanguage->findOneBy(array('name' => "Norwegian"));
     $language->setPriority(11);
     $this->em->persist($language);
     $language = $repoLanguage->findOneBy(array('name' => "German"));
     $language->setPriority(10);
     $this->em->persist($language);
     $language = $repoLanguage->findOneBy(array('name' => "Portuguese"));
     $language->setPriority(9);
     $this->em->persist($language);
     $language = $repoLanguage->findOneBy(array('name' => "Arabic"));
     $language->setPriority(8);
     $this->em->persist($language);
     $language = $repoLanguage->findOneBy(array('name' => "Polish"));
     $language->setPriority(7);
     $this->em->persist($language);
     $language = $repoLanguage->findOneBy(array('name' => "Dutch"));
     $language->setPriority(6);
     $this->em->persist($language);
     $language = $repoLanguage->findOneBy(array('name' => "Ukrainian"));
     $language->setPriority(5);
     $this->em->persist($language);
     $language = $repoLanguage->findOneBy(array('name' => "Hindi"));
     $language->setPriority(4);
     $this->em->persist($language);
     $language = $repoLanguage->findOneBy(array('name' => "Czech"));
     $language->setPriority(3);
     $this->em->persist($language);
     $language = $repoLanguage->findOneBy(array('name' => "Turkish"));
     $language->setPriority(2);
     $this->em->persist($language);
     $language = $repoLanguage->findOneBy(array('name' => "Other"));
     $language->setPriority(1);
     $this->em->persist($language);
     $this->em->flush();
 }
 /**
  * {@inheritDoc}
  */
 public function setId($id)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setId', array($id));
     return parent::setId($id);
 }