Skip to content


DDC-832: Not quoted class name when updating entity #5352

doctrinebot opened this Issue · 6 comments

2 participants


Jira issue originally created by user needle:

When trying to update an entity which have a reserved name. Doctrine doesn't quoted its name.

On Doctrine\ORM\Persisters\BasicEntityPersister, updateTable, $tableName is directly used to create the sql. We may use $this->_class->getQuotedTableName($this->platform) instead ?

I'm going to propose a merge for that on github.


Comment created by needle:

Here is a test case

<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping xmlns="" xmlns:xsi="" xsi:schemaLocation="">

    <entity name="Like" table="`like`">
        <id name="id" type="integer" column="id">
            <generator strategy="SEQUENCE"/>
            <sequence-generator sequence-name="like*id*seq" allocation-size="1" initial-value="1"/>

        <field name="value" column="value" type="string" />
  id serial NOT NULL,
  "value" character varying,
class Like {

  private $id;
  public  $value;
$entity = new Like();
$entity->value = 'toto';


$entity->value = 'tata';

Comment created by @beberlei:

This issue partly depends on DBAL-57 (otherwise the testsuite keeps failing)


Comment created by @beberlei:

There is really no simple fix for this issue, your proposed one breaks joined table inheritance.


Comment created by @beberlei:

Found a way! fixed.


Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.0-RC1 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.