Wiki

Articles tagged with "belongs_to", sorted by date (updated)X
Displaying 1-1 of 1 result(s).

Relations: BELONGS_TO versus HAS_ONE

Updated about a year ago by JorgeeFAQs9 comments – viewed 84,505 times – ( +67 ) – version 1.1
It's very common to see new Yii users confusing the relations HAS_ONE and BELONGS_TO, and getting it wrong means you won't get proper values back. And though we'll talk about HAS_MANY as well, we're specifically omitting the MANY_MANY relation because it's a whole different animal.