Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-838

SchemaTool - ignores the attribute uniq in relations

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0-BETA4
    • Fix Version/s: 2.x
    • Component/s: Tools
    • Security Level: All
    • Labels:
      None
    • Environment:
      Ubuntu, PHP 5.3.2, MySQL

      Description

      Mapper
      <entity name="Default_Model_Test" table="test">
        <id name="id" type="integer" column="id">
          <generator strategy="AUTO"/>
        </id>
        <field name="blabla" column="blabla" type="boolean"/>
        <one-to-one field="user" target-entity="Users_Model_User">
          <join-column name="users_id" referenced-column-name="id" on-delete="CASCADE" on-update="CASCADE" unique="false" />
        </one-to-one>
      </entity>
      
      SQL
      CREATE TABLE test (id INT AUTO_INCREMENT NOT NULL, users_id INT DEFAULT NULL, blabla TINYINT(1) NOT NULL, UNIQUE INDEX test_users_id_uniq (users_id), PRIMARY KEY(id)) ENGINE = InnoDB;
      ALTER TABLE test ADD FOREIGN KEY (users_id) REFERENCES users(id) ON UPDATE CASCADE ON DELETE CASCADE;
      

      Actual:
      UNIQUE INDEX test_users_id_uniq (users_id)

      Expected:
      INDEX test_users_id (users_id)

        Activity

        gektor created issue -
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Fix Version/s 2.x [ 10090 ]
        Priority Major [ 3 ] Minor [ 4 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 12005 ] jira-feedback [ 13881 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 13881 ] jira-feedback2 [ 15745 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 15745 ] jira-feedback3 [ 18002 ]

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            gektor
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: