Cascade remove tries to delete child entities with wrong colum name for fk column #5452

Open
opened 2026-01-22 15:08:04 +01:00 by admin · 4 comments
Owner

Originally created by @Vassyli on GitHub (Mar 11, 2017).

During testing our entities, I've found that a OneToMany relationship with cascade={"persist", "remove"} successfully persists child entities, but fails to remove them with a DBALException.

Parent Entity:

{
    use Creator;
    use Deletor;
    use SceneBasics;
    /** @Id @Column(type="integer") @GeneratedValue */
    private $id;
    /**
     * @OneToMany(targetEntity="SceneConnectionGroup", mappedBy="scene", cascade={"persist", "remove"})
     */
    private $connectionGroups = null;
}

Child Entity:

class SceneConnectionGroup implements SceneConnectable
{
    /**
     * @Id
     * @ManyToOne(targetEntity="Scene", inversedBy="outgoingConnections", cascade={"persist"})
     * @JoinColumn(name="scene_id", referencedColumnName="id")
     */
    private $scene;
    /**
     * @Id
     * @Column(type="string")
     */
    private $name;
}

Removal of the parent entity results in an exception:

Doctrine\DBAL\DBALException: An exception occurred while executing 'DELETE FROM scene_connection_groups WHERE scene = ? AND name = ?' with params [null, "lotgd\/module-village\/outside"]:

The issue lies in the naming of the fk column: Doctrine tries to use the colum name "scene", which does not exist in the table. Instead, the column is actually called scene_id as specified in @JoinColumn. Removal of the @JoinColumn does not change the result (it still throws the exception).

Renaming the join column to "scene" circumvents this issue. We use currently the most recent version (2.5.6) on PHP 7.1.

Originally created by @Vassyli on GitHub (Mar 11, 2017). During testing our entities, I've found that a OneToMany relationship with `cascade={"persist", "remove"}` successfully persists child entities, but fails to remove them with a DBALException. Parent Entity: ```class Scene implements CreateableInterface, SceneConnectable { use Creator; use Deletor; use SceneBasics; /** @Id @Column(type="integer") @GeneratedValue */ private $id; /** * @OneToMany(targetEntity="SceneConnectionGroup", mappedBy="scene", cascade={"persist", "remove"}) */ private $connectionGroups = null; } ``` Child Entity: ``` class SceneConnectionGroup implements SceneConnectable { /** * @Id * @ManyToOne(targetEntity="Scene", inversedBy="outgoingConnections", cascade={"persist"}) * @JoinColumn(name="scene_id", referencedColumnName="id") */ private $scene; /** * @Id * @Column(type="string") */ private $name; } ``` Removal of the parent entity results in an exception: ``` Doctrine\DBAL\DBALException: An exception occurred while executing 'DELETE FROM scene_connection_groups WHERE scene = ? AND name = ?' with params [null, "lotgd\/module-village\/outside"]: ``` The issue lies in the naming of the fk column: Doctrine tries to use the colum name "scene", which does not exist in the table. Instead, the column is actually called scene_id as specified in `@JoinColumn`. Removal of the `@JoinColumn` does not change the result (it still throws the exception). Renaming the join column to "scene" circumvents this issue. We use currently the most recent version (2.5.6) on PHP 7.1.
Author
Owner

@Ocramius commented on GitHub (Mar 12, 2017):

@Vassyli got a trace?

@Ocramius commented on GitHub (Mar 12, 2017): @Vassyli got a trace?
Author
Owner

@Vassyli commented on GitHub (Mar 12, 2017):

Sure:

SQLSTATE[HY000]: General error: 1 no such column: scene

/lotgd/module-village/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:131
/lotgd/module-village/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1015
/lotgd/module-village/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:596
/lotgd/module-village/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:580
/lotgd/module-village/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1094
/lotgd/module-village/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:406
/lotgd/module-village/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:356
/lotgd/module-village/vendor/lotgd/core/src/Tools/Model/Deletor.php:25
/lotgd/module-village/tests/ModuleTest.php:66

Caused by
PDOException: SQLSTATE[HY000]: General error: 1 no such column: scene

/lotgd/module-village/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1003
/lotgd/module-village/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:596
/lotgd/module-village/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:580
/lotgd/module-village/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1094
/lotgd/module-village/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:406
/lotgd/module-village/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:356
/lotgd/module-village/vendor/lotgd/core/src/Tools/Model/Deletor.php:25
/lotgd/module-village/tests/ModuleTest.php:66

Deletor.php looks like

    public function delete(EntityManagerInterface $em)
    {
        $em->remove($this);
        $em->flush(); // line 25
    }
@Vassyli commented on GitHub (Mar 12, 2017): Sure: ``` SQLSTATE[HY000]: General error: 1 no such column: scene /lotgd/module-village/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:131 /lotgd/module-village/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1015 /lotgd/module-village/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:596 /lotgd/module-village/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:580 /lotgd/module-village/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1094 /lotgd/module-village/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:406 /lotgd/module-village/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:356 /lotgd/module-village/vendor/lotgd/core/src/Tools/Model/Deletor.php:25 /lotgd/module-village/tests/ModuleTest.php:66 Caused by PDOException: SQLSTATE[HY000]: General error: 1 no such column: scene /lotgd/module-village/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1003 /lotgd/module-village/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:596 /lotgd/module-village/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:580 /lotgd/module-village/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1094 /lotgd/module-village/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:406 /lotgd/module-village/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:356 /lotgd/module-village/vendor/lotgd/core/src/Tools/Model/Deletor.php:25 /lotgd/module-village/tests/ModuleTest.php:66 ``` Deletor.php looks like ``` public function delete(EntityManagerInterface $em) { $em->remove($this); $em->flush(); // line 25 } ```
Author
Owner

@Vassyli commented on GitHub (Apr 2, 2019):

This issue is still up with additional problems. I have an entity with the following foreign key as the sole primary key:

     * @Id
     * @OneToOne(targetEntity="Character", inversedBy="viewpoint", cascade="persist")
     * @JoinColumn(fieldName="owner_id", referencedColumnName="id")
     */
    private $owner;

Again, inserting new entities seems to work without any issue, but if we delete them, doctrine uses "owner" instead of "owner_id". This still is true in Doctrine 2.6, and renaming the column does not seem to help. The complete class_info of that entity looks like that:

object(Doctrine\ORM\Mapping\ClassMetadata)#1857 (40) {
  ["name"]=>
  string(27) "LotGD\Core\Models\Viewpoint"
  ["namespace"]=>
  string(17) "LotGD\Core\Models"
  ["rootEntityName"]=>
  string(27) "LotGD\Core\Models\Viewpoint"
  ["customGeneratorDefinition"]=>
  NULL
  ["customRepositoryClassName"]=>
  NULL
  ["isMappedSuperclass"]=>
  bool(false)
  ["isEmbeddedClass"]=>
  bool(false)
  ["parentClasses"]=>
  array(0) {
  }
  ["subClasses"]=>
  array(0) {
  }
  ["embeddedClasses"]=>
  array(0) {
  }
  ["namedQueries"]=>
  array(0) {
  }
  ["namedNativeQueries"]=>
  array(0) {
  }
  ["sqlResultSetMappings"]=>
  array(0) {
  }
  ["identifier"]=>
  array(1) {
    [0]=>
    string(5) "owner"
  }
  ["inheritanceType"]=>
  int(1)
  ["generatorType"]=>
  int(5)
  ["fieldMappings"]=>
  array(6) {
    ["actionGroups"]=>
    array(8) {
      ["fieldName"]=>
      string(12) "actionGroups"
      ["type"]=>
      string(5) "array"
      ["scale"]=>
      int(0)
      ["length"]=>
      NULL
      ["unique"]=>
      bool(false)
      ["nullable"]=>
      bool(false)
      ["precision"]=>
      int(0)
      ["columnName"]=>
      string(12) "actionGroups"
    }
    ["attachments"]=>
    array(8) {
      ["fieldName"]=>
      string(11) "attachments"
      ["type"]=>
      string(5) "array"
      ["scale"]=>
      int(0)
      ["length"]=>
      NULL
      ["unique"]=>
      bool(false)
      ["nullable"]=>
      bool(false)
      ["precision"]=>
      int(0)
      ["columnName"]=>
      string(11) "attachments"
    }
    ["data"]=>
    array(8) {
      ["fieldName"]=>
      string(4) "data"
      ["type"]=>
      string(5) "array"
      ["scale"]=>
      int(0)
      ["length"]=>
      NULL
      ["unique"]=>
      bool(false)
      ["nullable"]=>
      bool(false)
      ["precision"]=>
      int(0)
      ["columnName"]=>
      string(4) "data"
    }
    ["title"]=>
    array(8) {
      ["fieldName"]=>
      string(5) "title"
      ["type"]=>
      string(6) "string"
      ["scale"]=>
      int(0)
      ["length"]=>
      int(255)
      ["unique"]=>
      bool(false)
      ["nullable"]=>
      bool(false)
      ["precision"]=>
      int(0)
      ["columnName"]=>
      string(5) "title"
    }
    ["description"]=>
    array(8) {
      ["fieldName"]=>
      string(11) "description"
      ["type"]=>
      string(4) "text"
      ["scale"]=>
      int(0)
      ["length"]=>
      NULL
      ["unique"]=>
      bool(false)
      ["nullable"]=>
      bool(false)
      ["precision"]=>
      int(0)
      ["columnName"]=>
      string(11) "description"
    }
    ["template"]=>
    array(8) {
      ["fieldName"]=>
      string(8) "template"
      ["type"]=>
      string(6) "string"
      ["scale"]=>
      int(0)
      ["length"]=>
      int(255)
      ["unique"]=>
      bool(false)
      ["nullable"]=>
      bool(false)
      ["precision"]=>
      int(0)
      ["columnName"]=>
      string(8) "template"
    }
  }
  ["fieldNames"]=>
  array(6) {
    ["actionGroups"]=>
    string(12) "actionGroups"
    ["attachments"]=>
    string(11) "attachments"
    ["data"]=>
    string(4) "data"
    ["title"]=>
    string(5) "title"
    ["description"]=>
    string(11) "description"
    ["template"]=>
    string(8) "template"
  }
  ["columnNames"]=>
  array(6) {
    ["actionGroups"]=>
    string(12) "actionGroups"
    ["attachments"]=>
    string(11) "attachments"
    ["data"]=>
    string(4) "data"
    ["title"]=>
    string(5) "title"
    ["description"]=>
    string(11) "description"
    ["template"]=>
    string(8) "template"
  }
  ["discriminatorValue"]=>
  NULL
  ["discriminatorMap"]=>
  array(0) {
  }
  ["discriminatorColumn"]=>
  NULL
  ["table"]=>
  array(1) {
    ["name"]=>
    string(10) "viewpoints"
  }
  ["lifecycleCallbacks"]=>
  array(0) {
  }
  ["entityListeners"]=>
  array(0) {
  }
  ["associationMappings"]=>
  array(2) {
    ["owner"]=>
    array(20) {
      ["fieldName"]=>
      string(5) "owner"
      ["id"]=>
      bool(true)
      ["targetEntity"]=>
      string(27) "LotGD\Core\Models\Character"
      ["joinColumns"]=>
      array(1) {
        [0]=>
        array(6) {
          ["name"]=>
          string(8) "owner_id"
          ["unique"]=>
          bool(false)
          ["nullable"]=>
          bool(true)
          ["onDelete"]=>
          NULL
          ["columnDefinition"]=>
          NULL
          ["referencedColumnName"]=>
          string(2) "id"
        }
      }
      ["mappedBy"]=>
      NULL
      ["inversedBy"]=>
      string(9) "viewpoint"
      ["cascade"]=>
      array(1) {
        [0]=>
        string(7) "persist"
      }
      ["orphanRemoval"]=>
      bool(false)
      ["fetch"]=>
      int(2)
      ["type"]=>
      int(1)
      ["isOwningSide"]=>
      bool(true)
      ["sourceEntity"]=>
      string(27) "LotGD\Core\Models\Viewpoint"
      ["isCascadeRemove"]=>
      bool(false)
      ["isCascadePersist"]=>
      bool(true)
      ["isCascadeRefresh"]=>
      bool(false)
      ["isCascadeMerge"]=>
      bool(false)
      ["isCascadeDetach"]=>
      bool(false)
      ["sourceToTargetKeyColumns"]=>
      array(1) {
        ["owner_id"]=>
        string(2) "id"
      }
      ["joinColumnFieldNames"]=>
      array(1) {
        ["owner_id"]=>
        string(8) "owner_id"
      }
      ["targetToSourceKeyColumns"]=>
      array(1) {
        ["id"]=>
        string(8) "owner_id"
      }
    }
    ["scene"]=>
    array(19) {
      ["fieldName"]=>
      string(5) "scene"
      ["joinColumns"]=>
      array(1) {
        [0]=>
        array(6) {
          ["name"]=>
          string(8) "scene_id"
          ["unique"]=>
          bool(false)
          ["nullable"]=>
          bool(true)
          ["onDelete"]=>
          NULL
          ["columnDefinition"]=>
          NULL
          ["referencedColumnName"]=>
          string(2) "id"
        }
      }
      ["cascade"]=>
      array(0) {
      }
      ["inversedBy"]=>
      NULL
      ["targetEntity"]=>
      string(23) "LotGD\Core\Models\Scene"
      ["fetch"]=>
      int(2)
      ["type"]=>
      int(2)
      ["mappedBy"]=>
      NULL
      ["isOwningSide"]=>
      bool(true)
      ["sourceEntity"]=>
      string(27) "LotGD\Core\Models\Viewpoint"
      ["isCascadeRemove"]=>
      bool(false)
      ["isCascadePersist"]=>
      bool(false)
      ["isCascadeRefresh"]=>
      bool(false)
      ["isCascadeMerge"]=>
      bool(false)
      ["isCascadeDetach"]=>
      bool(false)
      ["sourceToTargetKeyColumns"]=>
      array(1) {
        ["scene_id"]=>
        string(2) "id"
      }
      ["joinColumnFieldNames"]=>
      array(1) {
        ["scene_id"]=>
        string(8) "scene_id"
      }
      ["targetToSourceKeyColumns"]=>
      array(1) {
        ["id"]=>
        string(8) "scene_id"
      }
      ["orphanRemoval"]=>
      bool(false)
    }
  }
  ["isIdentifierComposite"]=>
  bool(false)
  ["containsForeignIdentifier"]=>
  bool(true)
  ["idGenerator"]=>
  object(Doctrine\ORM\Id\AssignedGenerator)#1870 (0) {
  }
  ["sequenceGeneratorDefinition"]=>
  NULL
  ["tableGeneratorDefinition"]=>
  NULL
  ["changeTrackingPolicy"]=>
  int(1)
  ["isVersioned"]=>
  NULL
  ["versionField"]=>
  NULL
  ["cache"]=>
  NULL
  ["reflClass"]=>
  object(ReflectionClass)#1869 (1) {
    ["name"]=>
    string(27) "LotGD\Core\Models\Viewpoint"
  }
  ["isReadOnly"]=>
  bool(false)
  ["namingStrategy":protected]=>
  object(Doctrine\ORM\Mapping\DefaultNamingStrategy)#1522 (0) {
  }
  ["reflFields"]=>
  array(8) {
    ["actionGroups"]=>
    object(ReflectionProperty)#1860 (2) {
      ["name"]=>
      string(12) "actionGroups"
      ["class"]=>
      string(27) "LotGD\Core\Models\Viewpoint"
    }
    ["attachments"]=>
    object(ReflectionProperty)#1868 (2) {
      ["name"]=>
      string(11) "attachments"
      ["class"]=>
      string(27) "LotGD\Core\Models\Viewpoint"
    }
    ["data"]=>
    object(ReflectionProperty)#1867 (2) {
      ["name"]=>
      string(4) "data"
      ["class"]=>
      string(27) "LotGD\Core\Models\Viewpoint"
    }
    ["title"]=>
    object(ReflectionProperty)#1866 (2) {
      ["name"]=>
      string(5) "title"
      ["class"]=>
      string(27) "LotGD\Core\Models\Viewpoint"
    }
    ["description"]=>
    object(ReflectionProperty)#1865 (2) {
      ["name"]=>
      string(11) "description"
      ["class"]=>
      string(27) "LotGD\Core\Models\Viewpoint"
    }
    ["template"]=>
    object(ReflectionProperty)#1864 (2) {
      ["name"]=>
      string(8) "template"
      ["class"]=>
      string(27) "LotGD\Core\Models\Viewpoint"
    }
    ["owner"]=>
    object(ReflectionProperty)#1863 (2) {
      ["name"]=>
      string(5) "owner"
      ["class"]=>
      string(27) "LotGD\Core\Models\Viewpoint"
    }
    ["scene"]=>
    object(ReflectionProperty)#1862 (2) {
      ["name"]=>
      string(5) "scene"
      ["class"]=>
      string(27) "LotGD\Core\Models\Viewpoint"
    }
  }
  ["instantiator":"Doctrine\ORM\Mapping\ClassMetadataInfo":private]=>
  object(Doctrine\Instantiator\Instantiator)#1859 (0) {
  }
}
@Vassyli commented on GitHub (Apr 2, 2019): This issue is still up with additional problems. I have an entity with the following foreign key as the sole primary key: ```/** * @Id * @OneToOne(targetEntity="Character", inversedBy="viewpoint", cascade="persist") * @JoinColumn(fieldName="owner_id", referencedColumnName="id") */ private $owner; ``` Again, inserting new entities seems to work without any issue, but if we delete them, doctrine uses "owner" instead of "owner_id". This still is true in Doctrine 2.6, and renaming the column does not seem to help. The complete class_info of that entity looks like that: ``` object(Doctrine\ORM\Mapping\ClassMetadata)#1857 (40) { ["name"]=> string(27) "LotGD\Core\Models\Viewpoint" ["namespace"]=> string(17) "LotGD\Core\Models" ["rootEntityName"]=> string(27) "LotGD\Core\Models\Viewpoint" ["customGeneratorDefinition"]=> NULL ["customRepositoryClassName"]=> NULL ["isMappedSuperclass"]=> bool(false) ["isEmbeddedClass"]=> bool(false) ["parentClasses"]=> array(0) { } ["subClasses"]=> array(0) { } ["embeddedClasses"]=> array(0) { } ["namedQueries"]=> array(0) { } ["namedNativeQueries"]=> array(0) { } ["sqlResultSetMappings"]=> array(0) { } ["identifier"]=> array(1) { [0]=> string(5) "owner" } ["inheritanceType"]=> int(1) ["generatorType"]=> int(5) ["fieldMappings"]=> array(6) { ["actionGroups"]=> array(8) { ["fieldName"]=> string(12) "actionGroups" ["type"]=> string(5) "array" ["scale"]=> int(0) ["length"]=> NULL ["unique"]=> bool(false) ["nullable"]=> bool(false) ["precision"]=> int(0) ["columnName"]=> string(12) "actionGroups" } ["attachments"]=> array(8) { ["fieldName"]=> string(11) "attachments" ["type"]=> string(5) "array" ["scale"]=> int(0) ["length"]=> NULL ["unique"]=> bool(false) ["nullable"]=> bool(false) ["precision"]=> int(0) ["columnName"]=> string(11) "attachments" } ["data"]=> array(8) { ["fieldName"]=> string(4) "data" ["type"]=> string(5) "array" ["scale"]=> int(0) ["length"]=> NULL ["unique"]=> bool(false) ["nullable"]=> bool(false) ["precision"]=> int(0) ["columnName"]=> string(4) "data" } ["title"]=> array(8) { ["fieldName"]=> string(5) "title" ["type"]=> string(6) "string" ["scale"]=> int(0) ["length"]=> int(255) ["unique"]=> bool(false) ["nullable"]=> bool(false) ["precision"]=> int(0) ["columnName"]=> string(5) "title" } ["description"]=> array(8) { ["fieldName"]=> string(11) "description" ["type"]=> string(4) "text" ["scale"]=> int(0) ["length"]=> NULL ["unique"]=> bool(false) ["nullable"]=> bool(false) ["precision"]=> int(0) ["columnName"]=> string(11) "description" } ["template"]=> array(8) { ["fieldName"]=> string(8) "template" ["type"]=> string(6) "string" ["scale"]=> int(0) ["length"]=> int(255) ["unique"]=> bool(false) ["nullable"]=> bool(false) ["precision"]=> int(0) ["columnName"]=> string(8) "template" } } ["fieldNames"]=> array(6) { ["actionGroups"]=> string(12) "actionGroups" ["attachments"]=> string(11) "attachments" ["data"]=> string(4) "data" ["title"]=> string(5) "title" ["description"]=> string(11) "description" ["template"]=> string(8) "template" } ["columnNames"]=> array(6) { ["actionGroups"]=> string(12) "actionGroups" ["attachments"]=> string(11) "attachments" ["data"]=> string(4) "data" ["title"]=> string(5) "title" ["description"]=> string(11) "description" ["template"]=> string(8) "template" } ["discriminatorValue"]=> NULL ["discriminatorMap"]=> array(0) { } ["discriminatorColumn"]=> NULL ["table"]=> array(1) { ["name"]=> string(10) "viewpoints" } ["lifecycleCallbacks"]=> array(0) { } ["entityListeners"]=> array(0) { } ["associationMappings"]=> array(2) { ["owner"]=> array(20) { ["fieldName"]=> string(5) "owner" ["id"]=> bool(true) ["targetEntity"]=> string(27) "LotGD\Core\Models\Character" ["joinColumns"]=> array(1) { [0]=> array(6) { ["name"]=> string(8) "owner_id" ["unique"]=> bool(false) ["nullable"]=> bool(true) ["onDelete"]=> NULL ["columnDefinition"]=> NULL ["referencedColumnName"]=> string(2) "id" } } ["mappedBy"]=> NULL ["inversedBy"]=> string(9) "viewpoint" ["cascade"]=> array(1) { [0]=> string(7) "persist" } ["orphanRemoval"]=> bool(false) ["fetch"]=> int(2) ["type"]=> int(1) ["isOwningSide"]=> bool(true) ["sourceEntity"]=> string(27) "LotGD\Core\Models\Viewpoint" ["isCascadeRemove"]=> bool(false) ["isCascadePersist"]=> bool(true) ["isCascadeRefresh"]=> bool(false) ["isCascadeMerge"]=> bool(false) ["isCascadeDetach"]=> bool(false) ["sourceToTargetKeyColumns"]=> array(1) { ["owner_id"]=> string(2) "id" } ["joinColumnFieldNames"]=> array(1) { ["owner_id"]=> string(8) "owner_id" } ["targetToSourceKeyColumns"]=> array(1) { ["id"]=> string(8) "owner_id" } } ["scene"]=> array(19) { ["fieldName"]=> string(5) "scene" ["joinColumns"]=> array(1) { [0]=> array(6) { ["name"]=> string(8) "scene_id" ["unique"]=> bool(false) ["nullable"]=> bool(true) ["onDelete"]=> NULL ["columnDefinition"]=> NULL ["referencedColumnName"]=> string(2) "id" } } ["cascade"]=> array(0) { } ["inversedBy"]=> NULL ["targetEntity"]=> string(23) "LotGD\Core\Models\Scene" ["fetch"]=> int(2) ["type"]=> int(2) ["mappedBy"]=> NULL ["isOwningSide"]=> bool(true) ["sourceEntity"]=> string(27) "LotGD\Core\Models\Viewpoint" ["isCascadeRemove"]=> bool(false) ["isCascadePersist"]=> bool(false) ["isCascadeRefresh"]=> bool(false) ["isCascadeMerge"]=> bool(false) ["isCascadeDetach"]=> bool(false) ["sourceToTargetKeyColumns"]=> array(1) { ["scene_id"]=> string(2) "id" } ["joinColumnFieldNames"]=> array(1) { ["scene_id"]=> string(8) "scene_id" } ["targetToSourceKeyColumns"]=> array(1) { ["id"]=> string(8) "scene_id" } ["orphanRemoval"]=> bool(false) } } ["isIdentifierComposite"]=> bool(false) ["containsForeignIdentifier"]=> bool(true) ["idGenerator"]=> object(Doctrine\ORM\Id\AssignedGenerator)#1870 (0) { } ["sequenceGeneratorDefinition"]=> NULL ["tableGeneratorDefinition"]=> NULL ["changeTrackingPolicy"]=> int(1) ["isVersioned"]=> NULL ["versionField"]=> NULL ["cache"]=> NULL ["reflClass"]=> object(ReflectionClass)#1869 (1) { ["name"]=> string(27) "LotGD\Core\Models\Viewpoint" } ["isReadOnly"]=> bool(false) ["namingStrategy":protected]=> object(Doctrine\ORM\Mapping\DefaultNamingStrategy)#1522 (0) { } ["reflFields"]=> array(8) { ["actionGroups"]=> object(ReflectionProperty)#1860 (2) { ["name"]=> string(12) "actionGroups" ["class"]=> string(27) "LotGD\Core\Models\Viewpoint" } ["attachments"]=> object(ReflectionProperty)#1868 (2) { ["name"]=> string(11) "attachments" ["class"]=> string(27) "LotGD\Core\Models\Viewpoint" } ["data"]=> object(ReflectionProperty)#1867 (2) { ["name"]=> string(4) "data" ["class"]=> string(27) "LotGD\Core\Models\Viewpoint" } ["title"]=> object(ReflectionProperty)#1866 (2) { ["name"]=> string(5) "title" ["class"]=> string(27) "LotGD\Core\Models\Viewpoint" } ["description"]=> object(ReflectionProperty)#1865 (2) { ["name"]=> string(11) "description" ["class"]=> string(27) "LotGD\Core\Models\Viewpoint" } ["template"]=> object(ReflectionProperty)#1864 (2) { ["name"]=> string(8) "template" ["class"]=> string(27) "LotGD\Core\Models\Viewpoint" } ["owner"]=> object(ReflectionProperty)#1863 (2) { ["name"]=> string(5) "owner" ["class"]=> string(27) "LotGD\Core\Models\Viewpoint" } ["scene"]=> object(ReflectionProperty)#1862 (2) { ["name"]=> string(5) "scene" ["class"]=> string(27) "LotGD\Core\Models\Viewpoint" } } ["instantiator":"Doctrine\ORM\Mapping\ClassMetadataInfo":private]=> object(Doctrine\Instantiator\Instantiator)#1859 (0) { } } ```
Author
Owner

@Vassyli commented on GitHub (Apr 2, 2019):

I just leave this here: This seems to be a sole issue with AnsiQuoteStrategy. Switching to BasicQuoteStrategy prevents this problem.

@Vassyli commented on GitHub (Apr 2, 2019): I just leave this here: This seems to be a sole issue with AnsiQuoteStrategy. Switching to BasicQuoteStrategy prevents this problem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5452