Hi all,

I developed a simple datamodel with ORM designer and exported to
Doctrine YML. Then used symfony to generated all ($php symfony
doctrine:build --all). Everything worked fine, except for the sql
insertion. This resulted in the following error:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an
error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near ' label ,
entrepeneur_id BIGINT, INDEX entrepeneur_id_idx (entrepeneur_id),
PRIMA' at line 1. Failing Query: "CREATE TABLE layar_actions (id
BIGINT UNIQUE AUTO_INCREMENT, uri , label , entrepeneur_id BIGINT,
INDEX entrepeneur_id_idx (entrepeneur_id), PRIMARY KEY(id)) ENGINE =
INNODB". Failing Query: CREATE TABLE layar_actions (id BIGINT UNIQUE
AUTO_INCREMENT, uri , label , entrepeneur_id BIGINT, INDEX
entrepeneur_id_idx (entrepeneur_id), PRIMARY KEY(id)) ENGINE = INNODB

I can't seem to figure out where the problem lies. Anybody any ideas?
Below is my YML file:


Entrepeneur:
  columns:
    id:
      primary: true
      type: integer
      notnull: true
      autoincrement: true
    name:
      type: string
    short_description:
      type: string
    lat:
      type: integer
    lon:
      type: integer
    layar_line2:
      type: string
    layar_line3:
      type: string
    layar_line4:
      type: string
    small_image:
      type: string
    introduction:
      type: string
    street:
      type: string
    street_number:
      type: string
    zipcode:
      type: string
    place:
      type: string
    phone:
      type: string
    email:
      type: string
    website:
      type: string
    event_or_open:
      type: boolean
    monday:
      type: string
    tuesday:
      type: string
    wednesday:
      type: string
    thursday:
      type: string
    friday:
      type: string
    saturday:
      type: string
    sunday:
      type: string
    event_date:
      type: string
    event_time:
      type: string
    event_location:
      type: string
    event_price:
      type: string
    event_age:
      type: string
    event_tickets:
      type: string
    event_extra_info:
      type: string
    social1:
      type: string
    social2:
      type: string
    social3:
      type: string
    social4:
      type: string
    maps_link:
      type: string
    Category_id:
      type: integer
      notnull: true
  relations:
    Category:
      onDelete: CASCADE
      local: Category_id
      foreign: id
LayarActions:
  columns:
    id:
      primary: true
      type: integer
      notnull: true
      autoincrement: true
    uri:
      type: string
    label:
      type: string
    Entrepeneur_id:
      type: integer
      notnull: true
  relations:
    Entrepeneur:
      local: Entrepeneur_id
      foreign: id
Category:
  columns:
    id:
      primary: true
      type: integer
      notnull: true
      autoincrement: true
    name:
      type: string
    title:
      type: string
    short_description:
      type: string
    small_image:
      type: string
    sort_order:
      type: integer
    cat_type:
      type: integer
    Category_id:
      type: integer
  relations:
    Category:
      onDelete: CASCADE
      local: Category_id
      foreign: id
Page:
  columns:
    id:
      primary: true
      type: integer
      notnull: true
      autoincrement: true
    title:
      type: string
    text:
      type: string
    page_type:
      type: integer
    Category_id:
      type: integer
      notnull: true
  relations:
    Category:
      onDelete: CASCADE
      local: Category_id
      foreign: id
Highlight:
  columns:
    id:
      primary: true
      type: integer
      notnull: true
      autoincrement: true
    type:
      type: string
    title:
      type: string
    short_description:
      type: string
    smal_limage:
      type: string
    long_description:
      type: string
    large_image:
      type: string
    item_title:
      type: string
    date:
      type: string
    time:
      type: string
    location:
      type: string
    price:
      type: string
    entrepeneur_link:
      type: string
    category_link:
      type: string
    Category_id:
      type: integer
      notnull: true
  relations:
    Category:
      onDelete: CASCADE
      local: Category_id
      foreign: id
AgendaItem:
  columns:
    id:
      primary: true
      type: integer
      notnull: true
      autoincrement: true
    short_title:
      type: string
    short_description:
      type: string
    small_image:
      type: string
    long_title:
      type: string
    long_dscription:
      type: string
    large_image:
      type: string
    Entrepeneur_id:
      type: integer
      notnull: true
  relations:
    Entrepeneur:
      onDelete: CASCADE
      local: Entrepeneur_id
      foreign: id
MediaItem:
  columns:
    id:
      primary: true
      type: integer
      notnull: true
      autoincrement: true
    title:
      type: string
    small_image:
      type: string
    short_description:
      type: string
    media_type:
      type: string
    Entrepeneur_id:
      type: integer
      notnull: true
  relations:
    Entrepeneur:
      onDelete: CASCADE
      local: Entrepeneur_id
      foreign: id
Photo:
  columns:
    id:
      primary: true
      type: integer
      notnull: true
      autoincrement: true
    url:
      type: string
    sort_order:
      type: integer
    MediaItem_id:
      type: integer
      notnull: true
  relations:
    MediaItem:
      onDelete: CASCADE
      local: MediaItem_id
      foreign: id


Thanks Peter

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to