/**
  * {@inheritDoc}
  */
 public function load(ObjectManager $objectManager)
 {
     $accounts = $this->getAccountsWithoutPartners($objectManager, count(self::$fixtureConditions));
     if (!$accounts) {
         return;
     }
     $users = $objectManager->getRepository('OroUserBundle:User')->findAll();
     $statuses = $objectManager->getRepository('OroCRMPartnerBundle:PartnerStatus')->findAll();
     $usersCount = count($users);
     $statusesCount = count($statuses);
     $organization = $this->getReference('default_organization');
     foreach ($accounts as $index => $account) {
         $partner = new Partner();
         $partner->setAccount($account);
         $partner->setOwner($users[rand(0, $usersCount - 1)]);
         $partner->setStatus($statuses[rand(0, $statusesCount - 1)]);
         $partner->setPartnerCondition(self::$fixtureConditions[$index]);
         $partner->setOrganization($organization);
         $objectManager->persist($partner);
     }
     $objectManager->flush();
 }