Previous Page
_fixTableName()

Solar_Model
_hasMany()

Next Page
_hasOne()

_hasMany()

protected void _hasMany ( string $name, array $opts default NULL )

Adds a named has-many relationship.

Inherited from Solar_Sql_Model.

Parameters

  • (string) $name: The relationship name, which will double as a property when records are fetched from the model.
  • (array) $opts: Additional options for the relationship.

Returns

  • (void)

Description

Adds a named has-many relationship.

Note that you can get "has-and-belongs-to-many" using "has-many" with a "through" option ("has-many-through").