$copy = clone($i);
$copy->encache();
$result[$i->$keyCol][] = $copy;
+ $pkeyVal = array();
+ foreach ($pkeyCols as $pkeyCol) {
+ $pkeyVal[] = $i->$pkeyCol;
+ }
+ $pkeyMap[$i->$keyCol][] = $pkeyVal;
}
- }
- foreach ($toFetch as $keyVal)
- {
- self::cacheSet(sprintf("%s:list:%s:%s", $cls, $keyCol, $keyVal),
- $result[$keyVal]);
- }
+ }
+ foreach ($toFetch as $keyVal) {
+ self::cacheSet(sprintf("%s:list-ids:%s:%s", $cls, $keyCol, $keyVal),
+ $pkeyMap[$keyVal]);
+ }
}
- return $result;
- }
-
- function columnType($columnName)
- {
- $keys = $this->table();
- if (!array_key_exists($columnName, $keys)) {
- throw new Exception('Unknown key column ' . $columnName . ' in ' . join(',', array_keys($keys)));
- }
-
- $def = $keys[$columnName];
-
- if ($def & DB_DATAOBJECT_INT) {
- return 'integer';
- } else {
- return 'string';
- }
+ return $result;
}
+ function columnType($columnName)
+ {
+ $keys = $this->table();
+ if (!array_key_exists($columnName, $keys)) {
+ throw new Exception('Unknown key column ' . $columnName . ' in ' . join(',', array_keys($keys)));
+ }
+
+ $def = $keys[$columnName];
+
+ if ($def & DB_DATAOBJECT_INT) {
+ return 'integer';
+ } else {
+ return 'string';
+ }
+ }
+
/**
- * @fixme Should this return false on lookup fail to match staticGet?
+ * @todo FIXME: Should this return false on lookup fail to match staticGet?
*/
function pkeyGet($cls, $kv)
{