首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >名为'controlling_tool.customer_group_text‘的表已存在

名为'controlling_tool.customer_group_text‘的表已存在
EN

Stack Overflow用户
提问于 2013-04-23 15:53:51
回答 1查看 152关注 0票数 0

我正在与DOCTRINE2CodeIgniter 2.I合作,我对此非常陌生。我正在尝试从实体生成mysqltables,我总是得到这个错误[Doctrine\DBAL\Schema\SchemaException]

名为'controlling_tool.customer_group_text‘的表已存在

我没有2个项目使用相同的实体。数据库是空的,即使我试图删除它,这个过程也不起作用。你能给我解释一下吗?

代码语言:javascript
复制
namespace Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Entity\CustomerGroupText
 *
 * @Entity(repositoryClass="CustomerGroupTextRepository")
 * @Table(name="customer_group_text", indexes={@Index(name="fk_status_idx", columns={"customer_group_id"}), @Index(name="fk_language_idx", columns={"language_id"})})
 */
class CustomerGroupText
{
    /**
     * @Id
     * @Column(type="string", length=5)
     */
    protected $customer_group_id;

    /**
     * @Column(type="string", length=45, nullable=true)
     */
    protected $description;

    /**
     * @ManyToOne(targetEntity="CustomerGroup", inversedBy="customerGroupTexts")
     * @JoinColumn(name="customer_group_id", referencedColumnName="id", nullable=false)
     */
    protected $customerGroup;

    /**
     * @ManyToOne(targetEntity="Language", inversedBy="customerGroupTexts")
     * @JoinColumn(name="language_id", referencedColumnName="id_language_id", nullable=false)
     */
    protected $language;

    public function __construct()
    {
    }

    /**
     * Set the value of customer_group_id.
     *
     * @param string $customer_group_id
     * @return Entity\CustomerGroupText
     */
    public function setCustomerGroupId($customer_group_id)
    {
        $this->customer_group_id = $customer_group_id;

        return $this;
    }

    /**
     * Get the value of customer_group_id.
     *
     * @return string
     */
    public function getCustomerGroupId()
    {
        return $this->customer_group_id;
    }

    /**
     * Set the value of description.
     *
     * @param string $description
     * @return Entity\CustomerGroupText
     */
    public function setDescription($description)
    {
        $this->description = $description;

        return $this;
    }

    /**
     * Get the value of description.
     *
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Set CustomerGroup entity (many to one).
     *
     * @param Entity\CustomerGroup $customerGroup
     * @return Entity\CustomerGroupText
     */
    public function setCustomerGroup(CustomerGroup $customerGroup = null)
    {
        $this->customerGroup = $customerGroup;

        return $this;
    }

    /**
     * Get CustomerGroup entity (many to one).
     *
     * @return Entity\CustomerGroup
     */
    public function getCustomerGroup()
    {
        return $this->customerGroup;
    }

    /**
     * Set Language entity (many to one).
     *
     * @param Entity\Language $language
     * @return Entity\CustomerGroupText
     */
    public function setLanguage(Language $language = null)
    {
        $this->language = $language;

        return $this;
    }

    /**
     * Get Language entity (many to one).
     *
     * @return Entity\Language
     */
    public function getLanguage()
    {
        return $this->language;
    }

    public function __sleep()
    {
        return array('customer_group_id', 'language_id', 'description');
    }
}
EN

回答 1

Stack Overflow用户

发布于 2013-04-23 16:00:10

只需尝试清除您的codeigniter项目缓存。我认为它正在尝试从那里读取配置详细信息。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16163895

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档