0
I am 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));
}
He returns it to me:
Class "Usuarios models" is not a Valid Entity or Mapped super class.
Does anyone have any idea what’s going on?
I’ve fought here and got nothing.
The repository returns one, or a collection of entities. You are defining that this entity is
models\Usuarios, that’s right?– Rodrigo Rigotti
this is the way my class is mapped. the path is user models (models and the name of my namespace)
– Sam
You have to pass the full class path. If you have a class
Usuarioinside the namespaceModels\Usuarios, then you have to useModels\Usuarios\Usuario. And stick to capital letters too.– Rodrigo Rigotti
OK, thank you was even this! valeuu
– Sam