私はDOCTRINE2
ANDを使用しCodeIgniter 2
ています。私はこれに非常に慣れていません。エンティティから生成しようとするmysqltables
と、常にこのエラーが発生
[Doctrine\DBAL\Schema\SchemaException]
します 「controlling_tool.customer_group_text」という名前のテーブルが既に存在
します 同じエンティティを使用する 2 つのプロジェクトはありません。データベースが空です 削除しようとしても、この手順は機能しません。説明してくれませんか
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');
}
}