Symfony2 没有要处理的元数据类
创建实体后:
php app/console doctrine:generate:entity
并在使用时:
php app/console doctrine:schema:update --force
我遇到了:
没有要处理的元数据类.
No Metadata Classes to process.
实体
namespace ISLabAdminBundleEntity;
use DoctrineORMMapping as ORM;
/**
* @ORMEntity
* @ORMTable(name="menu_items")
*/
class MenuItem
{
/**
* @ORMColumn(name="id", type="integer")
* @ORMId
* @ORMGeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORMColumn(name="parent", type="integer")
*/
private $parent;
// ...
}
推荐答案
我遇到了类似的问题,我花了一段时间才找到清除缓存的方法.只清除学说的缓存对我不起作用.使用下面的命令清除整个环境(在这种情况下是生产环境)
I had a similar problem and took me a while until I find out how to clear out the cache. Clearing only doctrine's cache did not work for me. Use the command below to clear the entire environment (production one in this case)
php app/console cache:clear --env=prod
相关文章