1
votes

In PS 17, are there any differences between the objects models save and update methods?

1

1 Answers

4
votes

save() method calls update() if object already exists.

public function save($null_values = false, $auto_date = true)
{
    return (int) $this->id > 0 ? $this->update($null_values) : $this->add($auto_date, $null_values);
}

So you can call one or the other indistinctly if you know that the object exists.