DDC-647: string length not taken into account on id while using Yaml driver #5156

Closed
doctrinebot opened this Issue Jun 20, 2010 · 4 comments

1 participant

@doctrinebot

Jira issue originally created by user goriol:

The string lenght specified in the Yaml file is not respected on id columns.

Sample YAML file

---
# Entities.Stock.dcm.yml
Entities\Stock:
  type: entity
  table: stocks
  id:
    id:
      type: string
      length: 10
      generator:
        strategy: NONE
  fields:
    nature:
      type: string
      length: 10
    name:
      type: string
      length: 40
    creationDate:
      name: creation_date
      type: datetime
    owner:
      type: string
      length: 8

Command used to generate the SQL statements:
./doctrine orm:schema-tool:create --dump-sql

Result:

CREATE TABLE stocks (id VARCHAR(255) NOT NULL, nature VARCHAR(12) NOT
NULL, name VARCHAR(40) NOT NULL, creationDate DATETIME NOT NULL, owner
VARCHAR(8) NOT NULL, PRIMARY KEY(id)) ENGINE = InnoDB

The "id" is generated as VARCHAR(255) instead of VARCHAR(10).

@doctrinebot

Comment created by @beberlei:

Fixed formating

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot

Comment created by @beberlei:

Hey Christian, please don't mark bugs as fixed that have not been merged into the main repository yet.

Merged now

@doctrinebot doctrinebot added this to the 2.0-BETA3 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment