2
내가 범주와 하위 범주 구조 엔티티를 구현하기 위해 노력하고 있지만, 명령 php app/console generate:doctrine:entities RFQIronilBundle
로 엔티티를 생성 할 때이 오류와 끝까지 찾을 수 없습니다 :의미 론적 오류 - 상수 X, 클래스 ... 오류
[Doctrine\Common\Annotations\AnnotationException]
[Semantical Error] Couldn't find constant production, class RFQ\IronilBundl
e\Entity\ProductionType.
을 내가 만든 ProductionType 엔터티 :
<?php
namespace RFQ\IronilBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* ProductionType
*
* @ORM\Table(production-type)
* @ORM\Entity
*/
class ProductionType
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=100)
*/
protected $name;
/**
* @ORM\OneToMany(targetEntity="ProductionType", mappedBy="parent")
**/
protected $children;
/**
* @ORM\ManyToOne(targetEntity="ProductionType", inversedBy="children")
* @ORM\JoinColumn(name="parent_id", referencedColumnName="id")
**/
protected $parent;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
}
내 엔터티를 생성하는 방법과이 오류의 원인은 무엇입니까? 감사합니다.
예, 그건 내 어리석은 실수였습니다! 때때로 구문 오류를 볼 수는 없지만 도움이 될 수있는 프로그래머가있어서 기쁩니다. 고맙습니다! – RydelHouse
신선한 눈, 그것이 전부입니다. – qooplmao