public function persist($object, $collection = null)
    {
        $repository = $this->getRepository(get_class($object), $collection);
        $repository->getClassMetadata()->getEventManager()->execute(EventManager::EVENT_PRE_PERSIST, $object);
        $this->addObject($object, ObjectManager::OBJ_NEW, $repository);
        $repository->getClassMetadata()->getEventManager()->execute(EventManager::EVENT_POST_PERSIST, $object);

        return $this;
    }