[Solar-svn] Revision 3088
pmjones at solarphp.com
pmjones at solarphp.com
Thu Apr 10 09:15:40 CDT 2008
Solar_Sql_Model: [CHG] After successful insert/update, use refresh() on records, instead of load(). The load() method messes with calculated cols and related values, and all we really want to do it refresh the table data itself.
Modified: trunk/Solar/Sql/Model.php
===================================================================
--- trunk/Solar/Sql/Model.php 2008-04-10 14:08:52 UTC (rev 3087)
+++ trunk/Solar/Sql/Model.php 2008-04-10 14:15:39 UTC (rev 3088)
@@ -1654,9 +1654,9 @@
}
}
- // reload the data into the record if needed
+ // refresh the table data in the record
if ($spec instanceof Solar_Sql_Model_Record) {
- $spec->load($data);
+ $spec->refresh();
$spec->setStatus('inserted');
}
@@ -1763,9 +1763,9 @@
$this->_sql->update($this->_table_name, $data, $where);
$this->unserializeCols($data);
- // reload the data into the record if needed
+ // refresh the table data in the record
if ($spec instanceof Solar_Sql_Model_Record) {
- $spec->load($data);
+ $spec->refresh();
$spec->setStatus('updated');
}
More information about the Solar-svn
mailing list