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); }
public function __construct($model = '', $another_foreign_key = '') { parent::__construct($model); $this->another_foreign_key = $another_foreign_key; }