示例#1
0
文件: HasMany.php 项目: azhai/CuteLib
 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);
 }
示例#2
0
 public function __construct($model = '', $another_foreign_key = '')
 {
     parent::__construct($model);
     $this->another_foreign_key = $another_foreign_key;
 }