public function bind(Database &$db, $table, $joins = null) { if (empty($this->foreign_key)) { $this->foreign_key = Inflect::singularize($table) . '_id'; } return parent::bind($db, $table, $joins); }