Symfony2子表单集合,带有已过滤的实体擦除当前实体

sorry for my english i'm french ! I'll try to explain my problem...

Context I want to create matchs reports for a football game, each captain can add or delete players of his own team with stats (goals, assists, etc...).

Problem Everything is working for one captain, I can add/delete players successfully recorded in database with only players of the team of the current captain. But, when the other want to do this, the subform show stats i've recorded previously but with the name of the team... And if I validate, the line in database is overridden with the name of the new player.

Example: I enter the result with my player "Player1" who scored twice ! When I save, everything gone perfectly saved in database. When I want to do the same as the second captain, with my player "Player2" who scores 1 goal. The line previously saved is overriden by the data of player2...

Code Here is my code

Controller simplified

    $em = $this->getDoctrine()->getManager();
    $match = $em->getRepository('OCPlatformBundle:Matchs')->findOneById($id);
    $form = $this->get('form.factory')->create(new MatchType(), $match);

    $form->handleRequest($request);

    //VERIF FEUILLE DE MATCH
    foreach($match->getStatsplayer() as $player){
            $player->setDefcleansheet(false);
            $player->setGkcleansheet(false);
            $player->setGame($match);
            $player->setClub($user->getClub());
    }

    if ($form->isValid()) {
        $em = $this->getDoctrine()->getManager();
        $em->persist($match);

        $em->flush();

MatchType.php

public function buildForm(FormBuilderInterface $builder, array $options)
{

    $builder
      ->add('homescore', 'choice', array('choices'   => array(0,1,2,3,4,5,6,7,8,9,10,11,12)))
      ->add('awayscore', 'choice', array('choices'   => array(0,1,2,3,4,5,6,7,8,9,10,11,12)))
      ->add('statsplayer', 'collection', array(
            'type'         => new StatsType(),
            'allow_add'    => true,
            'allow_delete' => true))
      ->add('save',      'submit')
    ;
}

StatsType.php

public function buildForm(FormBuilderInterface $builder, array $options)
{
    //Players to show is filtered with the querybuilder
    $builder
      ->add('player', 'entity', array(
        'class' => 'OCUserBundle:User',
        'property' => 'username',
        'query_builder' => function(\Doctrine\ORM\EntityRepository $er) {
                global $kernel;
                $user = $kernel->getContainer()->get('security.context')->getToken()->getUser();
                return $er->createQueryBuilder('q')
                ->where('q.club = :pf')
                ->orderBy('q.club', 'ASC')
                ->setParameter('pf', $user->getClub());
            },
        'required' => true, 
        'label' => false,
        ))
      ->add('goals', 'choice', array(
                    'choices'   => array(0,1,2,3,4,5,6,7),
                    'label' => 'goals', 'translation_domain' => 'FOSUserBundle', 'attr' => array(
                'placeholder' => 'goals'
            )))
      ->add('assists', 'choice', array(
                    'choices'   => array(0,1,2,3,4,5,6,7),
                    'label' => 'assists', 'translation_domain' => 'FOSUserBundle', 'attr' => array(
                'placeholder' => 'assists'
            )))

}

Thanks for your help !

EDIT:

My entities :

Matchs.php

/**
* Matchs
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="OC\PlatformBundle\Entity\MatchsRepository")
*/
class Matchs
{
/**
 * @var integer
 *
 * @ORM\Column(name="id", type="integer")
 * @ORM\Id
 * @ORM\GeneratedValue(strategy="AUTO")
 */
private $id;

/**
 * @var integer
 *
 * @ORM\Column(name="competition", type="integer")
 */
private $competition; 

/**
 * @var integer
 *
 * @ORM\Column(name="phase", type="integer")
 */
private $phase;

/**
 * @var \DateTime
 *
 * @ORM\Column(name="datemax", type="datetime")
 */
private $datemax;

/**
 * @ORM\ManyToOne(targetEntity="OC\PlatformBundle\Entity\Club")
 * @ORM\Joincolumn(nullable=false)
 */
private $home;

/**
 * @ORM\ManyToOne(targetEntity="OC\PlatformBundle\Entity\Club")
 * @ORM\Joincolumn(nullable=false)
 */
private $away;

/**
 * @var integer
 *
 * @ORM\Column(name="homescore", type="integer")
 */
private $homescore;

/**
 * @var integer
 *
 * @ORM\Column(name="awayscore", type="integer")
 */
private $awayscore;

/**
 * @var \DateTime
 *
 * @ORM\Column(name="dateevent", type="datetime")
 */
private $dateevent;

/**
 * @ORM\OneToMany(targetEntity="OC\PlatformBundle\Entity\Stats", mappedBy="game", cascade={"persist"})
 * @Assert\Valid
 */
private $statsplayer;

Stats.php

/**
* Stats
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="OC\PlatformBundle\Entity\StatsRepository")
* @UniqueEntity({"player","game"})
*/
class Stats
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
private $id;

/**
 * @ORM\ManyToOne(targetEntity="OC\UserBundle\Entity\User", cascade={"persist"})
 * @ORM\JoinColumn(nullable=false)
 */
private $player;

/**
 * @ORM\ManyToOne(targetEntity="OC\PlatformBundle\Entity\Club")
 * @ORM\JoinColumn(nullable=false)
 */
private $club;

/**
 * @ORM\ManyToOne(targetEntity="OC\PlatformBundle\Entity\Matchs", inversedBy="statsplayer", cascade={"persist"})
 * @ORM\JoinColumns({
 *  @ORM\JoinColumn(name="game_id", referencedColumnName="id")
 * })
 */
private $game;

/**
 * @var integer
 *
 * @ORM\Column(name="goals", type="integer")
 */
private $goals;

/**
 * @var integer
 *
 * @ORM\Column(name="assists", type="integer")
 */
private $assists;

/**
 * @var boolean
 *
 * @ORM\Column(name="yellowcard", type="boolean")
 */
private $yellowcard;

/**
 * @var boolean
 *
 * @ORM\Column(name="redcard", type="boolean")
 */
private $redcard;

/**
 * @var boolean
 *
 * @ORM\Column(name="defcleansheet", type="boolean")
 */
private $defcleansheet;

/**
 * @var boolean
 *
 * @ORM\Column(name="gkcleansheet", type="boolean")
 */
private $gkcleansheet;