我使用Symfony2的,當我嘗試生成架構($ PHP應用程序/控制檯學說:生成:架構)我得到一個錯誤..Symfony2的錯誤:未找到映射文件命名爲
[Doctrine\ORM\Mapping\MappingException] No mapping file found named 'xxx.UserBundle.Entity.User.php' for class 'xxx\UserBundle\Entity\User'.
我只有2個捆綁在proyect:
- UserBundle
- FileBundle
我用U連接FileBundle serBundle與此代碼:
/**
* @ORM\ManyToOne(targetEntity="xxx\UserBundle\Entity\User")
**/
protected $user;
文件的標題是這樣的:
namespace xx\UserBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
**/
class User
{ ###...###}
FileBundle非常相似.. 謝謝!
我想'xxx'和'xx'只是替代,是嗎? – 2012-03-01 23:35:00
是的,對不起, – quique150 2012-03-01 23:57:59
我添加了答案...但它是一個遠射:) – 2012-03-02 00:04:19