-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Milestone
Description
Document: http://book.cakephp.org/3.0/en/appendices/orm-migration.html#inflection-rules-updated
Section:
Note
BelongsTo and HasOne associations will use the singular form, while HasMany and BelongsToMany (HABTM) will use plural forms.
This does not seem to be true.
I have setup Questions and Users
// QuestionsTable.php
$this->belongsTo('User');
// UsersTable.php
$this->hasMany('Questions');
$questions = $this->Questions->find()
->contain('User')
->order(['Questions.created' => 'DESC']);
// Errors with 'Questions is not associated with Users'I've had to update my relationship to be $this->belongsTo('Users'); and my contain to ->contain('Users')
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels