public function persist(IEntity $entity, $withCascade = true);
/** @inheritdoc */ public function persist(IEntity $entity, $withCascade = TRUE) { $this->identityMap->check($entity); if ($withCascade) { return $this->model->persist($entity); } $this->attach($entity); $this->doFireEvent($entity, 'onBeforePersist'); $this->doPersist($entity); return $entity; }