src/ORM/DataObject.php
public function writeRelations()
    {
        if (!$this->isInDB()) {
            return;
        }

        // If there's any relations that couldn't be saved before, save them now (we have an ID here)
        if ($this->unsavedRelations) {
            foreach ($this->unsavedRelations as $name => $list) {
                $list->changeToList($this->$name());
            }
            $this->unsavedRelations = array();
        }
    }
public function writeRelations()
    {
        if (!$this->isInDB()) {
            return;
        }

        // If there's any relations that couldn't be saved before, save them now (we have an ID here)
        if ($this->unsavedRelations) {
            foreach ($this->unsavedRelations as $name => $list) {
                $list->changeToList($this->$name());
            }
            $this->unsavedRelations = array();
        }
    }
public function writeRelations ( ) { if ( ! $ this -> isInDB ( ) ) { return ; } // If there's any relations that couldn't be saved before, save them now (we have an ID here) if ( $ this -> unsavedRelations ) { foreach ( $ this -> unsavedRelations as $ name => $ list ) { $ list -> changeToList ( $ this -> $ name ( ) ) ; } $ this -> unsavedRelations = array ( ) ; } }
Writes cached relation lists to the database, if possible
Writes cached relation lists to the database if possible