 + */
 +class PlayerRepository extends EntityRepository
 +{
++    public function getCaptainForTeam(Team $team)
++    {
++        return $this->build()
++            ->andWhere($this->getAlias().'.team = :team')
++            ->setParameter('team', $team)
++            ->setMaxResults(1)
++            ->getQuery()
++            ->getOneOrNullResult()
++        ;
++    }
 +}
 diff --git a/src/App/Entity/Team.php b/src/App/Entity/Team.php
 new file mode 100644
-index 0000000..2d32dec
+index 0000000..effa912
 --- /dev/null
 +++ b/src/App/Entity/Team.php
 @@ -0,0 +1,138 @@

+     *
+     * @ORM\Column(name="isActive", type="boolean")
+     */
+    private $isActive;
+
+    /**
+     * @var Player[]

+    {
+        $this->team = $team;
+    }
+
+    public function __toString()
+    {
+        return $this->getFirstName().' '.$this->getLastName();
+    }
+}
diff --git a/src/App/Entity/PlayerRepository.php b/src/App/Entity/PlayerRepository.php
new file mode 100644
index 0000000..7ac29f9
--- /dev/null
+++ b/src/App/Entity/PlayerRepository.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace App\Entity;
+
+use Knp\RadBundle\Doctrine\EntityRepository;
+
+/**
+ * PlayerRepository
