我已将zend与教义相结合,一切正常但当我开始使用doctrine cli生成实体时:doctrine orm:generate-entities 我在评论中获得了没有@ORM,@ Entity的php Entities类。
示例:
<?php
use Doctrine\ORM\Mapping as ORM;
/**
* Tag
*/
class Tag
{
/**
* @var string $tagName
*/
private $tagName;
/**
* @var \Doctrine\Common\Collections\ArrayCollection
*/
private $eventevent;
/**
* Constructor
*/
public function __construct()
{
$this->eventevent = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get tagName
*
* @return string
*/
public function getTagName()
{
return $this->tagName;
}
/**
* Add eventevent
*
* @param Event $eventevent
* @return Tag
*/
public function addEventevent(\Event $eventevent)
{
$this->eventevent[] = $eventevent;
return $this;
}
/**
* Remove eventevent
*
* @param Event $eventevent
*/
public function removeEventevent(\Event $eventevent)
{
$this->eventevent->removeElement($eventevent);
}
/**
* Get eventevent
*
* @return Doctrine\Common\Collections\Collection
*/
public function getEventevent()
{
return $this->eventevent;
}
}