Wiki

Articles tagged with "belongs_to"X
Displaying 1-1 of 1 result(s).

Relations: BELONGS_TO versus HAS_ONE

Created 3 years ago by Steve FriedlFAQs9 comments – viewed 78,142 times – ( +65 ) – 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.