-1
이미 다른 사용 된 엔티티가있는 엔티티 폴더에서 새 엔티티를 만들었습니다. 그러나이 새로운 엔티티는 doctrine에 의해 탐지되지 않습니다. mapping : info도 doctrine : schema : validate새 엔티티가 검색되지 않았습니다.
파일이 단순히 고려되지 않는 것 같습니다 (symfony에서 오류를 작성하면 문제없이 실행됩니다).
나는 VM 시스템 문제에 대해 생각하지만 내가 (예 : 새 YML, 새로운 심포니 형태로) 다른 새 파일을 만들려고하고 작동 ...
는 또한 캐시를 삭제 : 투명 교리 : 캐시 :<?php
namespace NRtworks\BusinessDimensionBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use JsonSerializable;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Table(name="test")
*/
class test implements JsonSerializable
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(type="string", length=50)
*/
protected $name;
/**
* @ORM\Column(type="string", length=100)
*/
protected $description;
/**
* Constructor
*/
public function __construct($id = NULL)
{
$this->id = $id;
$this->name = "Chart Of Accounts";
$this->description = "Default chart of accounts";
}
//this method returns an array with default values
public function getDefaultObject()
{
$result = Array();
$result['id'] = $this->id;
$result['name'] = $this->name;
$result['description'] = $this->code;
return $result;
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
public function setId($id)
{
$this->id = $id;
}
/**
* Set name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* Get name
*/
public function getName()
{
return $this->name;
}
/**
* Set code
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* Get description
*/
public function getDescription()
{
return $this->description;
}
public function jsonSerialize()
{
return array(
'id' => $this->id,
'name' => $this->name,
'description' => $this->description
);
}
}
?>
이에서 올 수 : 모든 옵션 여기
클래스는?
당신은 @ORM \ 엔티티 주석을 잊으 셨나요? –
ahhh f .......... 진지하게 – Eagle1