My Entity class:
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
{
But when I am adding a customer it throws this error, it is looking for the wrong table.
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database.customerentity' doesn't exist
I did try with this, but doesn't help:
@ORM\Table(name="`customers`")
Schema generation shows this:
$ doctrine-module orm:schema-tool:update --dump-sql
The following SQL statements will be executed:
CREATE TABLE CustomerEntity (id VARCHAR(36) NOT NULL,
.....
What am I doing wrong?
I have cleared the cache too
orm:clear-cache:metadata
orm:clear-cache:query
orm:clear-cache:result
The problem you have is, that Doctrine expects each Annotation only once. Try this: