[[belongs_to]] complements a [[has_many]] or [[has_one]] association.

In general, the Foo model belongs_to :bar if the foo table has a bar_id foreign key column.

Examples of this:

* Companies database, where an **account** belongs to a **company**.
* Forum system, where a **topic** belongs to a **forum**, which belongs to a **category**.
* a gallery system where a **thumbnail** belongs to a **picture**.

h2. Example Forum

See ForumExample.

h2. Notes

When using @:counter_cache => true@, be sure the default value on your model_count column defaults to something that can be incremented. NULL + 1, for instance, equals NULL so the counter SQL won't work.
