Try capitalizing @entity (@Entity)
On 09/18/2010 08:41 AM, spike3111 wrote:
I try to set up a simple custom repository, looking at the
documentation doctrine2. I first tried the command
doctrine:generate:repositories, which does not make mistakes, but that
does not work either. So I created a class Entity
CustomCategorieRepository
<?php
namespace Application\HelloBundle\Entity;
use Doctrine\ORM\EntityRepository;
class CustomCategorieRepository extends EntityRepository
{
public function getAllCategorie()
{
return $this->_em->createQuery('SELECT u FROM Application
\HelloBundle\Entity\Categorie u LEFT JOIN u.articles a')
->getResult();
}
}
And in my entity I added annotation @entity:
<?php
namespace Application\HelloBundle\Entity;
/**
* Application\HelloBundle\Entity\Categorie
* @entity(repositoryClass="Application\HelloBundle\Entity
\CustomCategorieRepository")
*/
class Categorie
{
I get an error on the fact that my custom repository is not taken into
account.
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en