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 2 years ago by Maurizio DombaFAQs6 comments – viewed 38,342 times – ( +58 )
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.