Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 31st, 2012  |  syntax: None  |  size: 1.00 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. symfony: forms with some fields related each other
  2. Region:
  3.   columns:
  4.     name: { type: string(255), notnull: true, unique: true }
  5.   options:
  6.     symfony: { form: false, filter: false }
  7.  
  8. Province:
  9.   columns:
  10.     id: { type: string(2), notnull: true, primary: true }
  11.     name: { type: string(255), notnull: true, unique: true }
  12.     region_id: { type: integer, notnull: true }
  13.   relations:
  14.     Region: { local: region_id, foreign: id, onDelete: CASCADE, foreignAlias: Provinces }
  15.   options:
  16.     symfony: { form: false, filter: false }
  17.  
  18. City:
  19.   columns:
  20.     id: { type: string(4), notnull: true, primary: true }
  21.     name: { type: string(255), notnull: true, unique: true }
  22.     province_id: { type: string(2), notnull: true }
  23.     latitude: { type: decimal, scale: 6, size: 8, notnull: true }
  24.     longitude: { type: decimal, scale: 6, size: 8, notnull: true }
  25.   relations:
  26.     Province: { local: province_id, foreign: id, onDelete: CASCADE, foreignAlias: Cities }
  27.   options:
  28.     symfony: { form: false, filter: false }