Called after an Entity is saved. Updates the object's internal state to reflect the
corresponding database entity, and sets the Entity object's key, if this is a newly-created
object. **Do not** call this method if you intend to update the database's copy of the
entity. Instead, see Model::save().
public sync ( mixed $id = null, array $data = [], array $options = [] ) | ||
$id | mixed | The ID to assign, where applicable. |
$data | array | Any additional generated data assigned to the object by the database. |
$options | array | Method options: - `'materialize'` _boolean_: Determines whether or not the flag should be set that indicates that this entity exists in the data store. Defaults to `true`. - `'dematerialize'` _boolean_: If set to `true`, indicates that this entity has been deleted from the data store and no longer exists. Defaults to `false`. |