title: Does RedBean need a "id" primary key?
body: <p>If you use <a href="http://redbeanphp.com/">RedBean</a> ORM, do you need to add a primary key named "id" to every table in your database?</p>
  
  <p>In my db I have a few tables that have primary keys pairs of 2 or 3 fields, or primary keys with other names than "id" (yes, I could change the name to "id", but it wouldn't really reflect the reality, because they are not IDs)</p>
  
  <p><strong>Example:</strong></p>
  
  <p>table1 - stores posts:</p>
  
  <pre><code>  id           INTEGER      PRIMARY KEY AUTOINCREMENT,
    name         TEXT,
    title        TEXT,
    content      TEXT,
  </code></pre>
  
  <p>table2 - stores meta for posts:</p>
  
  <pre><code>  post         INTEGER      DEFAULT 0,     # &lt;- references "id" from "posts"
    name         TEXT,
    value        TEXT,
    PRIMARY KEY(name, post),
    CONSTRAINT posts_meta FOREIGN KEY(post)
      REFERENCES posts(id) ON DELETE CASCADE ON UPDATE RESTRICT
  </code></pre>
  
  <p>Would RedBean work with this kind of db structure?</p>