Problems persisting data in Doctrine

0

I'm doing this:

  function Autenticar($objecto) {

        //require $this->db;
        require ROOT . "config/bootstrap.php";

        return $entityManager->getRepository('models\Usuarios')->findOneBy(array('login' => $objecto->login, 'senha' => $objecto->senha));
    }

It returns me this:

  

Class "models \ Users" is not a valid entity or mapped super class.

Does anyone have an idea of what's going on?

I've fought here and I have not gotten anything.

    
asked by anonymous 30.09.2014 / 20:21

1 answer

1

I changed the entity manager creation configuration that way

setting previously defined settings

$config = Setup::createAnnotationMetadataConfiguration($entidades, $isDevMode, NULL, NULL, FALSE); //adicionei Null no 3 e 4 parametro, e no 5 parametro coloquei true pra ele aceitar  uso de NAMESPACE..

Creating the Entity Manager based on the dev and database settings

$entityManager = EntityManager::create($dbParams, $config);

Okay, thanks for the help

    
01.10.2014 / 15:34