public function create(Database $db, array $data) { if (is_array($data)) { $x = new Record($db, $this->_dbTable, $this->_dbSeq, $this->_dbPkey); $x->booleanFields = $this->booleanFields; $this->id = $x->create($data); // $this->load($db); } else { throw new ErrorException(__METHOD__ . ": no data to load"); } return $this->id; }