Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1617

EntityGenerator does not create uniqueConstraints annotations

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Component/s: Tools
    • Security Level: All
    • Labels:
      None

      Description

      I have add some uniqueConstraints in ClassMetadataInfo but the EntityGenerator does not create the annotations for this.


      private function _generateTableAnnotation($metadata)
      {
          $table = array();
      
          if (isset($metadata->table['schema'])) {
               $table[] = 'schema="' . $metadata->table['schema'] . '"';
          }
      
          if (isset($metadata->table['name'])) {
              $table[] = 'name="' . $metadata->table['name'] . '"';
          }
      
          return '@' . $this->_annotationsPrefix . 'Table(' . implode(', ', $table) . ')';
      }
      
      

        Activity

        David Badura created issue -
        David Badura made changes -
        Field Original Value New Value
        Description I have add some uniqueConstraints in ClassMetadataInfo but the EntityGenerator does not create the annotations for this.

        {code:php}

            private function _generateTableAnnotation($metadata)
            {
                $table = array();

                if (isset($metadata->table['schema'])) {
                    $table[] = 'schema="' . $metadata->table['schema'] . '"';
                }

                if (isset($metadata->table['name'])) {
                    $table[] = 'name="' . $metadata->table['name'] . '"';
                }

                return '@' . $this->_annotationsPrefix . 'Table(' . implode(', ', $table) . ')';
            }

        {code}
        I have add some uniqueConstraints in ClassMetadataInfo but the EntityGenerator does not create the annotations for this.

        \\

        {code}

        private function _generateTableAnnotation($metadata)
        {
            $table = array();

            if (isset($metadata->table['schema'])) {
                 $table[] = 'schema="' . $metadata->table['schema'] . '"';
            }

            if (isset($metadata->table['name'])) {
                $table[] = 'name="' . $metadata->table['name'] . '"';
            }

            return '@' . $this->_annotationsPrefix . 'Table(' . implode(', ', $table) . ')';
        }

        {code}
        Hide
        Benjamin Eberlei added a comment -

        Fixed

        Show
        Benjamin Eberlei added a comment - Fixed
        Benjamin Eberlei made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.2 [ 10157 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 13383 ] jira-feedback [ 15208 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 15208 ] jira-feedback2 [ 17072 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 17072 ] jira-feedback3 [ 19325 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-1617, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            David Badura
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: