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.
Both `BELONGS_TO` and `HAS_ONE` are about linking two models together, and sound like the same thing, but they link in essentially opposite directions. Let's illustrate with three simple tables, each of which has a primary key of (`id`), and a number of linking fields (`user_id`) that reference the User table.
~~~
USER table
- id
- name