[Solar-svn] Revision 2852
pmjones at solarphp.com
pmjones at solarphp.com
Thu Oct 11 12:44:43 CDT 2007
Solar_Model_Nodes_Record: [CHG] In _postSave(), get the table name from the tags model instead of hardcoding the "tags" table name, for portability. Thanks, Rodrigo Moraes.
Modified: branches/orm/Solar/Model/Nodes/Record.php
===================================================================
--- branches/orm/Solar/Model/Nodes/Record.php 2007-10-10 17:04:45 UTC (rev 2851)
+++ branches/orm/Solar/Model/Nodes/Record.php 2007-10-11 17:44:42 UTC (rev 2852)
@@ -45,8 +45,9 @@
// record for each new one.
//
- // hold on to the tags model
+ // hold on to the tags model, and the table name
$tags_model = $this->tags->getModel();
+ $tags_table = $tags_model->table_name;
// get the list of tags on the record
$tag_names = $this->tags->getNames();
@@ -55,7 +56,7 @@
// that do not exist will not be in this array.
$params = array(
'where' => array(
- 'tags.name IN (?)' => $tag_names,
+ "{$tags_table}.name IN (?)" => $tag_names,
),
);
$existing_tags = $tags_model->fetchAll($params);
More information about the Solar-svn
mailing list