findBelongsTo() публичный Метод

Find belongsTo relations and add them to the associations list.
public findBelongsTo ( Table $model, array $associations ) : array
$model Cake\ORM\Table Database\Table instance of table being generated.
$associations array Array of in progress associations
Результат array Associations with belongsTo added in.
Пример #1
0
 /**
  * Test that belongsTo generation ignores _id mid-column
  *
  * @return void
  */
 public function testBelongsToGenerationIdMidColumn()
 {
     $model = TableRegistry::get('Articles');
     $model->schema(['id' => ['type' => 'integer'], 'thing_id_field' => ['type' => 'integer']]);
     $result = $this->Task->findBelongsTo($model, []);
     $this->assertEquals([], $result);
 }