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}
        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 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: