AbstractRelationship | --BelongsTo
Class Details
Belongs to relationship.
class School extends ActiveRecord\Model {} class Person extends ActiveRecord\Model { static $belongs_to = array( array('school') ); }
Example using options:
class School extends ActiveRecord\Model {} class Person extends ActiveRecord\Model { static $belongs_to = array( array('school', 'primary_key' => 'school_id') ); }