Update resultset

Looking at the documentation, a resultset should have an update() function I should be able to use like:

public function initialize(){
public function updateHold(){

However, I get an error saying the function isn't found. Looking at the documentation for the class, there is no mention of the update() function.

So, does it exist? Is there any way to update every record in a resultset?


As you relate the ItemHold as a hasMany relationship you get a resultsetInterface by calling $this->ItemHold. So to update every record you have to loop and update.

foreach ($this->ItemHold as $itemHold) {

I didn't try this ;)

If there is a solution for your last qustion let us know :)

The documentation clearly shows though, that the update() function is available on the ResultSet: http://docs.phalconphp.com/en/latest/reference/models.html#updating-related-records