Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2526

ORM does not see one filed when run from Symfonys app/console

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 2.3.4
    • Fix Version/s: None
    • Component/s: Mapping Drivers
    • Security Level: All
    • Labels:
      None

      Description

      I am in the process of moving my code base from ZF1 to Symfony2. For ZF1 I used a custom console for running Doctrines CLI.

      When I run Doctrine from my ZF1 branch I get:

      application/console orm:schema-tool:update --dump-sql
      Nothing to update - your database is already in sync with the current entity metadata.
      

      But if I run this on my SF2 branch through Symfonys console I get:

      app/console doctrine:schema:update --dump-sql
      ALTER TABLE profile DROP allowed_protocols
      

      I have 15 entites, and this occurs only for this one filed in one entity. The field is defined as:

          /**
           * @ORM\Column(type="integer", nullable=true)
           * @var integer
           */
          protected $allowed_protocols;
      

      If I change the name of the field (add or remove a letter in the name of the variable) Doctrine starts recognizing it in both CLI applications.

      This sounds very strange to me and I do not know where to start digging since the Doctrine versions are the same in both branches, as well as the entites.

        Activity

        Goran Juric created issue -
        Goran Juric made changes -
        Field Original Value New Value
        Description I am in the process of moving my code base from ZF1 to Symfony2. For ZF1 I used a custom console for running Doctrines CLI.

        When I run Doctrine from my ZF1 branch I get:

        {noformat}
        application/console orm:schema-tool:update --dump-sql
        Nothing to update - your database is already in sync with the current entity metadata.
        {noformat}

        But if I run this on my SF2 branch through Symfonys console I get:

        {noformat}
        app/console doctrine:schema:update --dump-sql
        ALTER TABLE profile DROP allowed_protocols
        {noformat}

        I have 15 entites, and this occurs only for this one filed in one entity. The field is defined as:

        {noformat}
            /**
             * @ORM\Column(type="integer", nullable=true)
             * @var integer
             */
            protected $allowed_protocols;
        {noformat}

        If I change the name of the field (add or remove a letter in the name of the variable) Doctrine starts recognizing it in both CLI applications.

        This sounds very strange to me and I do not know where to start digging since the Doctrine versions are the same in both branched, as well as the entites.
        I am in the process of moving my code base from ZF1 to Symfony2. For ZF1 I used a custom console for running Doctrines CLI.

        When I run Doctrine from my ZF1 branch I get:

        {noformat}
        application/console orm:schema-tool:update --dump-sql
        Nothing to update - your database is already in sync with the current entity metadata.
        {noformat}

        But if I run this on my SF2 branch through Symfonys console I get:

        {noformat}
        app/console doctrine:schema:update --dump-sql
        ALTER TABLE profile DROP allowed_protocols
        {noformat}

        I have 15 entites, and this occurs only for this one filed in one entity. The field is defined as:

        {noformat}
            /**
             * @ORM\Column(type="integer", nullable=true)
             * @var integer
             */
            protected $allowed_protocols;
        {noformat}

        If I change the name of the field (add or remove a letter in the name of the variable) Doctrine starts recognizing it in both CLI applications.

        This sounds very strange to me and I do not know where to start digging since the Doctrine versions are the same in both branches, as well as the entites.
        Goran Juric made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Goran Juric
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: