I looked around to see what this problem could be but I don't find anything similar.
Error:
Call to a member function persist() on null
The exception points me to this line
        $this->repository->getEntityManager()->persist($data);
In my repository i call the entitity mananger like so
    public function getEntityManager()
    {
    parent::getEntityManager();
    }
Why does the exception get thrown ? I'm very confused about this.
 
    