Solar_Sql_Model_Record::setNewRelated()

public Solar_Sql_Model_Record|Solar_Sql_Model_Collection Solar_Sql_Model_Record::setNewRelated ( string $name , array $data = NULL )

Sets the related to be a new record/collection, but only if the related is empty.

Parameters

  • (string) $name: The relation name.

  • (array) $data: Initial data.

Returns

  • (Solar_Sql_Model_Record|Solar_Sql_Model_Collection)

Description

Sets the related to be a new record/collection, but only if the related is empty.



Local