1
을 자동로드 할 수 없습니다 클래스의 주석 @Doctrine \ ORM \ 매핑 \ 모델 :심포니 3 [의미 론적 오류] AppBundle 엔티티 사용자가 존재하지 않는, 또는 내가 로그인하려고 할 때
[Semantical Error] The annotation "@Doctrine\ORM\Mapping\Model" in class AppBundle\Entity\User does not exist, or could not be auto-loaded.
내 엔티티 : 나는 번들로 내 코드를 refarcor을 시도하고 모든 일하는
namespace AppBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* @ORM\Model()
* @ORM\Table()
*/
class User implements UserInterface
{
}
. 이제이 오류가
enable_annotations 나타 사실이다
정말 사람이 알고 있나요 잘못해야하는지 이해하지?
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Symfony\Component\Security\Core\User\UserInterface;
/** @Entity */
class User implements UserInterface
{}
당신의 실체는 다음과 같습니다
왜 *) (* @ ORM의 \ 모델을 작성하는? 대신 개체 /** * @ORM \ 엔티티() * @ORM의 \ 테이블 (이름 = "사용자")/ – Generwp
아 내가 알고 있지만 모든 를 * 일하는 그나마이 같은 것을 할 필요가 지금부터. 어쨌든 도움이되는 답변을 보내 주셔서 감사합니다 :-) –
AFLICT Doctrine v2에 'Model'이라는 주석이 없습니다. –