Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-ALPHA4, 2.0-BETA1
    • Fix Version/s: 2.0-BETA2
    • Component/s: Mapping Drivers
    • Security Level: All
    • Labels:
      None

      Description

      Hi all,

      I'm working with Doctrine 2.0 ALPHA 4 on Opensolaris with PHP 5.3 and Postgresql 8.3.

      When specifiying a sequence name in xml mapping file, Doctrine doesn't seems to use it. After debugging time, i found in ORM/Mapping/Driver/XmlDriver.php on line 193 :

                  // Check for SequenceGenerator/TableGenerator definition
                  if (isset($idElement->{'sequence-generator'})) {
                      $seqGenerator = $idElement->{'sequence-generator'};
                      $metadata->setSequenceGeneratorDefinition(array(
                          'sequenceName' => $seqGenerator->{'sequence-name'},
                          'allocationSize' => $seqGenerator->{'allocation-size'},
                          'initialValue' => $seqGeneratorAnnot->{'initial-value'}
                      ));
                  } else if (isset($idElement->{'table-generator'})) {
                      throw MappingException::tableIdGeneratorNotImplemented($className);
                  }
      

      Obviously $seqGenerator->

      {'sequence-name'}

      return void things, even if xml file is correct. So i decided to replace it with : $seqGenerator['sequence-name']

                  // Check for SequenceGenerator/TableGenerator definition
                  if (isset($idElement->{'sequence-generator'})) {
                      $seqGenerator = $idElement->{'sequence-generator'};
                      $metadata->setSequenceGeneratorDefinition(array(
                          'sequenceName' => (string)$seqGenerator['sequence-name'],
                          'allocationSize' => (string)$seqGenerator['allocation-size'],
                          'initialValue' => (string)$seqGeneratorAnnot['initial-value']
                      ));
                  } else if (isset($idElement->{'table-generator'})) {
                      throw MappingException::tableIdGeneratorNotImplemented($className);
                  }
      

      Hope it will be usefull.


      Paul Fariello

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Benjamin Eberlei
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: