public function testCreateWithKey() {
$entity = new Record(array(
'model' => $this->_model,
'data' => array('id' => 1, 'title' => 'new post', 'body' => 'the body')
));
$query = new Query(compact('entity') + array('type' => 'create'));
$expected = 1;
$result = $this->db->create($query);
$this->assertTrue($result);
$result = $query->entity()->id;
$this->assertEqual($expected, $result);
$expected = "INSERT INTO {mock_database_posts} ({id}, {title}, {body})";
$expected .= " VALUES (1, 'new post', 'the body');";
$this->assertEqual($expected, $this->db->sql);
}