Symfony2 没有要处理的元数据类 [英] Symfony2 No Metadata Classes to process

查看:16
本文介绍了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

这篇关于Symfony2 没有要处理的元数据类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆