public function delete($id)
 {
     $model = ReflectionUtils::createNewInstance(static::$forModel);
     $statement = new DeleteStatement($model->table());
     $statement->where(Restrictions::eq("id", ":id"))->addParameter("id", $id);
     $this->getDatabase()->execute($statement);
 }
 public function testShouldCreateSqlDeleteStatementWithParameters()
 {
     $table = "test";
     $delete = new DeleteStatement($table);
     $delete->where(Restrictions::eq("id", ":id"));
     $delete->addParameter(":id", 1001);
     $sql = $delete->toSql();
     $this->assertThat($sql, $this->equalTo("DELETE FROM test WHERE (id = :id)"));
     $this->assertThat($delete->hasParameters(), $this->isTrue());
 }