예제 #1
0
 public function getRelations()
 {
     return [Enjoin::belongsTo(Enjoin::get('Books'), ['foreignKey' => 'books_id']), Enjoin::belongsTo(Enjoin::get('Publishers'), ['foreignKey' => 'publishers_id']), Enjoin::hasMany(Enjoin::get('Shipped'), ['foreignKey' => 'publishers_books_id']), Enjoin::hasMany(Enjoin::get('Preorders'), ['foreignKey' => 'publishers_books_id'])];
 }
예제 #2
0
 public function getRelations()
 {
     return [Enjoin::hasMany(Enjoin::get('Books'), ['foreignKey' => 'languages_id'])];
 }
예제 #3
0
 public function getRelations()
 {
     return [Enjoin::hasMany(Enjoin::get('PublishersBooks'), ['foreignKey' => 'publishers_id']), Enjoin::belongsTo(Enjoin::get('Publishers'), ['foreignKey' => 'pid', 'as' => 'parent']), Enjoin::hasMany(Enjoin::get('Publishers'), ['foreignKey' => 'pid', 'as' => 'child'])];
 }
예제 #4
0
파일: Books.php 프로젝트: mightydes/enjoin
 public function getRelations()
 {
     return [Enjoin::belongsTo(Enjoin::get('Authors'), ['foreignKey' => 'authors_id']), Enjoin::belongsTo(Enjoin::get('Languages'), ['foreignKey' => 'languages_id']), Enjoin::hasMany(Enjoin::get('Reviews'), ['foreignKey' => 'books_id']), Enjoin::hasMany(Enjoin::get('PublishersBooks'), ['foreignKey' => 'books_id'])];
 }
예제 #5
0
 public function getRelations()
 {
     return [Enjoin::hasMany(Enjoin::get('Articles'), ['foreignKey' => 'authors_id']), Enjoin::hasMany(Enjoin::get('Books'), ['foreignKey' => 'authors_id'])];
 }