Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-ALPHA3
    • Fix Version/s: 2.0-ALPHA4
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None
    • Environment:
      linux/php 5.3

      Description

      I've created this:

      Test:
      type: entity
      table: test
      fields:
      id:
      type: integer
      id: true
      generator:
      strategy: auto
      sequenceGenerator:
      sequenceName: test_id_seq
      allocationSize: 1
      initialValue: 1
      nome:
      type: string
      length: 300
      sigla:
      type: string
      length: 5
      notnull: false

      result:
      CREATE TABLE test (id INT NOT NULL, nome TEXT NOT NULL, sigla VARCHAR(5) DEFAULT NOT NULL, PRIMARY KEY(id))
      CREATE SEQUENCE test_id_seq INCREMENT BY 1 START 1

      I debuged doctrine's code and saw in the
      lib/Doctrine/ORM/Tools/SchemaTool.php on _gatherColumn method
      that is tested
      $column['notnull'] = isset($mapping['nullable']) ? ! $mapping['nullable'] : true;
      on line 266

      but in lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php there's not any check for 'nullable', just 'notnull'...
      on line 193 there's this validation:
      if (isset($fieldMapping['notnull'])) {;
      $mapping['notnull'] = $fieldMapping['notnull'];
      }

      if I insert this validation:
      if (isset($fieldMapping['nullable'])) {;
      $mapping['nullable'] = $fieldMapping['nullable'];
      }

      it's gonna work just fine...

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            Henrique Girardi dos Santos
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: