Find belongsTo relations and add them to the associations list.
public findBelongsTo ( |
||
$model | Database\Table instance of table being generated. | |
$associations | array | Array of in progress associations |
리턴 | array | Associations with belongsTo added in. |
/** * 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); }