Previous Page
_exception()

Solar_Sql_Model_Related_HasMany
_fixForeignKey()

Next Page
_fixRelatedCol()

_fixForeignKey()

protected void _fixForeignKey ( array &$opts )

Corrects the foreign_key value in the options; uses the native-model table name as singular when a regular has-many, and the foreign- model primary column as-is when a 'has-many through'.

Parameters

  • (array) &$opts: The user-defined relationship options.

Returns

  • (void)

Description

Corrects the foreign_key value in the options; uses the native-model table name as singular when a regular has-many, and the foreign- model primary column as-is when a 'has-many through'.