title: Doctrine YAML Data Fixture Question
body: <p>where can i learn more abt creating database markup in yaml and data fixtures. </p>
  
  <p>i followed a tutorial and they create a relationship like so: under relations in both User and Car. my qn is why is 'type: many' in Car. can i have it in User instead (just curious)?</p>
  
  <p>abt data types. different database have different database support. i thought that in MySQL (InnoDB as used here) integer shld be tinyint(x), bigint(x), int(x) ... or string shld be varchar not string? isit not strict what i shld use here?</p>
  
  <pre><code>options:
    type: INNODB
    collate: utf8_general_ci
    charset: utf8
  
  User:
    columns:
      id:
        type: integer
        primary: true
        autoincrement: true
      name: string(300)
      email: string(300)
      phone: string(9)
      car_id: integer
    relations: 
      Car: 
        local: car_id
        foreign: id
  Car:
    columns:
      id:
        type: integer
        primary: true
        autoincrement: true
      brand: string(300)
    relations:
      Users:
        class: User
        foreign: car_id
        local: id
        type: many
  </code></pre>
  
  <h1>UPDATE 1</h1>
  
  <ol>
  <li><p>"it is only necessary to specify the relationship on the end where the foreign key exists" in my example, that will be? do they mean the FK table (car) or the FK column (user)? </p></li>
  <li><p>i dont see TEXT data type, is that clob (Character Large OBject)? – iceangel89 0 secs ago  [delete this comment] </p></li>
  <li><p>what is foreignAlias? is there a alias too?</p></li>
  </ol>
  
  <h1>UPDATE 2</h1>
  
  <p>this will be abit long, i just wish to clarify some of the code examples in the <a href="http://www.doctrine-project.org/documentation/manual/1_0/en/yaml-schema-files" rel="nofollow noreferrer">Doctrine YAML Schema Files docs page</a>. focus on the relationships section -> in // comments</p>
  
  <pre><code>User:
    columns:
      username:
        type: string(255)
      password:
        type: string(255)
      contact_id:
        type: integer
    relations:
      Contact:
        class: Contact // if the table is named Contact, class will be Contact also?
        local: contact_id 
        foreign: id
        foreignAlias: User // whats alias for? 
        foreignType: one // one contact ... to ...
        type: one // one user?
  
  Contact:
    columns:
      first_name:
        type: string(255)
      last_name:
        type: string(255)
      phone:
        type: string(255)
      email:
        type: string(255)
      address:
        type: string(255)
    relations:
      User:
        class: User
        local: id
        foreign: contact_id
        foreignAlias: Contact
        foreignType: one
        type: one
  </code></pre>
  
  <p>regarding the <a href="http://www.doctrine-project.org/documentation/manual/1_0/en/yaml-schema-files#relationships:many-to-many" rel="nofollow noreferrer">many to many example</a>, what does the following mean? </p>
  
  <pre><code>attributes:
    export: all
    validate: true
  
  tableName: group_table
  
  refClass: GroupUser
  </code></pre>