title: MySql on delete cascade
body: <p>Im having trouble with on delete cascade.</p>
  
  <pre><code>drop table orders;
  CREATE TABLE orders(
      o_id        INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
      c_id        INTEGER NOT NULL REFERENCES Customer(c_id),
      a_id        INTEGER NOT NULL REFERENCES Address(a_id),
      order_date  DATE NOT NULL,
      value       DECIMAL(10,2) NOT NULL CHECK (value &gt;= 0.00),
      method      VARCHAR(20),
      order_type      VARCHAR(30),
      order_interval  VARCHAR(20),
      start_date  DATE NOT NULL,
      admin       VARCHAR(30),
      active      INTEGER NOT NULL,
      notes       VARCHAR(300)
  );
  
  drop table order_details;
  CREATE TABLE order_details(
      o_id            INTEGER NOT NULL REFERENCES orders(o_id) ON DELETE CASCADE,
      wp_id           INTEGER NOT NULL REFERENCES wp_details(wp_id),
      pack_revision   INTEGER NOT NULL,
      pack_order      INTEGER NOT NULL,
      delivery_date   DATE NOT NULL,
      dispatched_date DATE NOT NULL,
      qty             INTEGER NOT NULL,
      f_id            INTEGER REFERENCES freebies(f_id),
      notes           VARCHAR(300),
      CONSTRAINT  PRIMARY KEY (wp_id, o_id) 
  );
  </code></pre>
  
  <p>When i delete an entry from orders, it does not delete from the order_details table. Are my table definitions wrong?</p>