Saves an object to database.
This function will create a new entry either if the object has a field named is_new and set to bool TRUE or if it hasn't the id field. Otherwise it will update the record matching the id field.
109 $auxobject = $object;
114 $auxobject = $auxobject->getParent();
115 }
while ($auxobject != NULL && ($auxobject instanceof
IcesDBObject));
118 $record[
'modified'] = REQUEST_TIME;
119 if (empty($record[
'id']) || isset($object->is_new) && $object->is_new == TRUE) {
122 if (empty($record[
'created'])) {
123 $record[
'created'] = REQUEST_TIME;
125 drupal_write_record($this->table, $record);
127 if (isset($record[
'id'])) {
128 $inner->id = $record[
'id'];
132 drupal_write_record($this->table, $record,
'id');
deleteRecordFromCache(array $record)
Deletes record from static cache.
Definition: common.db.logic.inc:302
saveExtraData()
Save object data.
Definition: common.db.logic.inc:444
getRecord()
Return object record.
Definition: common.db.logic.inc:391
Base class for all objects that are serializable with this framework.
Definition: common.db.logic.inc:383