【发布时间】:2020-10-08 01:03:26
【问题描述】:
我的实体类:
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
【问题讨论】:
-
你清除缓存了吗?
-
我处于开发者模式。而
data/cache文件夹是空的。
标签: orm doctrine-orm laminas