我的实体类:
use Doctrine\ORM\Mapping as ORM;
/**
* CustomerEntity
* @ORM\Entity
* @ORM\Table(name="customers")
* @ORM\Table(uniqueConstraints={
* @ORM\UniqueConstraint(name="email", columns={"email"}),
* })
* @ORM\Entity(repositoryClass="Customer\V1\Rest\Customer\CustomerRepository")
*/
class CustomerEntity
{
但是当我添加一个客户时,它会抛出这个错误,它正在寻找错误的表。
SQLSTATE [42S02]:未找到基表或视图:1146 表 'database.customerentity' 不存在
我确实尝试过,但没有帮助:
@ORM\Table(name="`customers`")
模式生成显示了这一点:
$ doctrine-module orm:schema-tool:update --dump-sql
The following SQL statements will be executed:
CREATE TABLE CustomerEntity (id VARCHAR(36) NOT NULL,
.....
我究竟做错了什么?
我也清了缓存
orm:clear-cache:metadata
orm:clear-cache:query
orm:clear-cache:result