Previous Page
rewind()

Solar_Example_Model_TestSolarSpecialCols_Record
save()

Next Page
setInvalid()

save()

public bool save ( array $data default NULL )

Saves this record to the database, inserting or updating as needed.

Inherited from Solar_Sql_Model_Record.

Parameters

  • (array) $data: An associative array of data to merge with existing record data.

Returns

  • (bool)

Description

Saves this record to the database, inserting or updating as needed.

Hook methods:

  1. _preSave() runs before all save operations.

  2. _preInsert() and _preUpdate() run before the insert or update.

  3. The record is validated, then inserted or updated.

  4. _postInsert() and _postUpdate() run after the insert or update.

  5. _postSave() runs after all save operations, but before related records are saved.

After _postSave(), we save each related Record and Collection object.