Entity/EntityService.php
public function saveEntity($entity)
    {
        if (!$this->entityManager->contains($entity)) {
            $this->entityManager->persist($entity);
        }

        $this->entityManager->flush();
        return true;
    }
public function saveEntity($entity)
    {
        if (!$this->entityManager->contains($entity)) {
            $this->entityManager->persist($entity);
        }

        $this->entityManager->flush();
        return true;
    }
public function saveEntity ( $ entity ) { if ( ! $ this -> entityManager -> contains ( $ entity ) ) { $ this -> entityManager -> persist ( $ entity ) ; } $ this -> entityManager -> flush ( ) ; return true ; }
Saves the entity.

@param object $entity
@return bool
Saves the entity .