为什么Sonata向我发送此错误:实体未管理?

I am using sonata the following packages in my symfony 4.1 project:

"sonata-project / admin-bundle": "^ 3.36",
"sonata-project / doctrine-orm-admin-bundle": "^ 3.6",

The administration works perfectly except when I have to delete a record that is when it throws that error. While listing, editing or creating a new one, there are no problems.

These are my sonata configuration files:

[sonata_admin.yml]

sonata_admin:
    title: 'Administración'
    search: false
    dashboard:
        blocks:
            - { type: sonata.admin.block.admin_list, position: left }
    security:
        role_admin: ROLE_ADMINISTRADOR

sonata_block:
    blocks:
        sonata.admin.block.admin_list:
            contexts: [admin]

[sonata_core.yml]

sonata_core:
    form:
        mapping:
            enabled: false

I created a controller for each entity that I want to administer here I leave the clearest example:

[EntidadAdmin]

class EntidadAdmin extends _Admin_
{
    /**
     * {@inheritDoc}
     */
    public static function getEntity()
    {
        return Entidad::class;
    }

    /**
     * @param FormMapper $formMapper
     */
    protected function configureFormFields(FormMapper $formMapper)
    {
        $formMapper->with('label.principal', ['class' => 'col-md-7'])
            ->add('nombre', Type\TextType::class, [
                'label' => 'label.nombre'
            ])
            ->add('descripcion', Type\TextareaType::class, [
                'label' => 'label.descripcion',
                'required' => false
            ])->end()->with('label.nomencladores',['class' => 'col-md-5'])
            ->add('nomencladores', EntityType::class, [
                'class' => Nomenclador::class,
                'multiple' => true,
                'required' => false,
                'label' => 'label.nomencladores'
            ])->end();

    }

    /**
     * {@inheritDoc}
     * @throws \RuntimeException
     */
    protected function configureListFields(ListMapper $listMapper)
    {
        $listMapper
            ->addIdentifier('nombre', self::LIST_TYPE_STRING, [
                'label' => 'label.nombre'
            ])
            ->add('nomencladores', self::LIST_TYPE_MANY_TO_ONE, [
                'label' => 'label.nomencladores'
            ]);

        return parent::configureListFields($listMapper);
    }
}

[Admin]

abstract class _Admin_ extends AbstractAdmin
{
    protected const LIST_TYPE_BOOLEAN = 'boolean';
    protected const LIST_TYPE_DATETIME = 'datetime';
    protected const LIST_TYPE_DECIMAL = 'decimal';
    protected const LIST_TYPE_IDENTIFIER = 'identifier';
    protected const LIST_TYPE_INTEGER = 'integer';
    protected const LIST_TYPE_MANY_TO_ONE = 'many_to_one';
    protected const LIST_TYPE_STRING = 'string';
    protected const LIST_TYPE_TEXT = 'text';
    protected const LIST_TYPE_DATE = 'date';
    protected const LIST_TYPE_TIME = 'time';
    protected const LIST_TYPE_ARRAY = 'array';

    protected const FILTER_TYPE_BOOLEAN = 'doctrine_orm_boolean';
    protected const FILTER_TYPE_CALLBACK = 'doctrine_orm_callback';
    protected const FILTER_TYPE_CHOICE = 'doctrine_orm_choice';
    protected const FILTER_TYPE_NUMBER = 'doctrine_orm_number';
    protected const FILTER_TYPE_AUTOCOMPLETE = 'doctrine_orm_model_autocomplete';
    protected const FILTER_TYPE_STRING = 'doctrine_orm_string';
    protected const FILTER_TYPE_DATE = 'doctrine_orm_date';
    protected const FILTER_TYPE_DATE_RANGE = 'doctrine_orm_date_range';
    protected const FILTER_TYPE_DATETIME = 'doctrine_orm_datetime';
    protected const FILTER_TYPE_DATETIME_RANGE = 'doctrine_orm_datetime_range';
    protected const FILTER_TYPE_CLASS = 'doctrine_orm_class';

    /**
     * {@inheritDoc}
     */
    public function __construct(string $code, string $class = null, string $baseControllerName)
    {
        $array = new ArrayCollection(explode('\\', static::class));
        $array->removeElement($array->first());
        $name = strtolower(str_replace($array->first(), null, $array->last()));

        $this->baseRouteName = strtolower(sprintf('sonata_%s_%s', $array->first(), $name));
        $this->baseRoutePattern = $name;
        $this->classnameLabel = $this->baseRoutePattern;
        $this->listModes = [];
        parent::__construct($code, static::getEntity(), $baseControllerName);
    }

    /**
     * @return string
     */
    abstract public static function getEntity();

    /**
     * @return null|ContainerInterface
     */
    protected function getContainer()
    {
        return $this->getConfigurationPool()->getContainer();
    }

    /**
     * {@inheritDoc}
     */
    public function getLabel()
    {
        return sprintf('label.%s', $this->baseRoutePattern);
    }

    /**
     * {@inheritDoc}
     */
    public function toString($object)
    {
        return parent::toString($object) ?? '';
    }

    /**
     * @param ListMapper $listMapper
     * @throws \RuntimeException
     */
    protected function configureListFields(ListMapper $listMapper)
    {
        $listMapper
            ->add('auditoria.user', self::LIST_TYPE_STRING, [
                'label' => 'label.modificado_por'
            ])
            ->add('auditoria.fecha', self::LIST_TYPE_DATETIME, [
                'label' => 'label.fecha_modificado'
            ]);
    }

    /**
     * @param string $class
     * @param int $id
     * @return null|_Entity_
     * @throws \Doctrine\ORM\ORMException
     * @throws \Doctrine\ORM\OptimisticLockException
     * @throws \Doctrine\ORM\TransactionRequiredException
     */
    protected function findEntity(string $class, int $id)
    {
        return $this->getContainer()
            ->get('doctrine.orm.entity_manager')
            ->getRepository($class)->find($id);;
    }
}

This is the error message specifically:

Entity ACCION is not managed. An entity is managed if its fetched from the database or registered as new through EntityManager#persist

I tried to overwrite the getObject and delete methods of the class Sonata \ AdminBundle \ Admin \ AdminAbstract thinking that the model was obtained in an incorrect way but still giving the same error

Example:

public function delete($object)
{
    $em = $this->getContainer()->get('doctrine.orm.entity_manager');
    $toDel = $em->getRepository(self::getEntity())->find($object->getId());
    parent::delete($toDel);
}

public function getObject($id)
{
    $container = $this->getConfigurationPool()->getContainer();
    $em = $container->get('doctrine.orm.entity_manager');
    $object = $em->getRepository(self::getEntity())->find($id);

    foreach ($this->getExtensions() as $extension) {
        $extension->alterObject($this, $object);
    }
    return $object;
}

I modified a record in the database and dump it and check that the model is being brought from the database so I do not understand why it tells me that it has not been obtained from the database

Sorry my english, any help will be welcome ;P