It is a somewhat complex table relation but it should work..

A rule, can have a command, the command can have many events. I get this
error:   Unknown record property / related component "ev1" on "Event"


Fixture:
Rule:
  rule_1:
    id: 1
    type: User
    campaign_id: 1
    msg_to: 32075
    msg_from: Outbound
    description: See if the user replies the number 1 or 2
    Command:
      command_1:
        command: 1
        Event:
          ev1:
            name: Add
          ev2:
            name: Remove
      command_2:
        command: 2



Schema

Rule:
  columns:
    id:
      primary: true
      unique: true
      type: integer
      notnull: true
      autoincrement: true
    type:
      type: enum
      values: [User,System]
    campaign_id:
      type: integer
      notnull: false
    msg_to:
      type: string(20)
      notnull: false
    msg_from:
      type: enum
      values: [Anyone,Outbound]
    description:
      type: string(255)
      notnull: false
    is_active:
      default: true
      type: boolean
      notnull: true
  relations:
    Campaign:
      local: campaign_id
      foreign: id
      type: many
      cascade: [delete]


Command:
  columns:
    id:
      primary: true
      unique: true
      type: integer
      notnull: true
      autoincrement: true
    rule_id:
      type: integer
      notnull: true
    command:
      type: string(160)
      notnull: false
  relations:
    Rule:
      local: rule_id
      foreign: id
      cascade: [delete]

Event:
  columns:
    id:
      primary: true
      unique: true
      type: integer
      notnull: true
      autoincrement: true
    command_id:
      type: integer
      notnull: true
    name:
      type: string(50)
      notnull: true
    campaign_id:
      type: integer
      notnull: false
    template_id:
      type: integer
      notnull: false
  relations:
    Command:
      local: command_id
      foreign: id
      type: many
      cascade: [delete]
    Campaign:
      local: campaign_id
      foreign: id
      cascade: [delete]
    Template:
      local: template_id
      foreign: id

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to