return parent::pkeyGetClass(get_called_class(), $kv);
}
+ static function pkeyCols()
+ {
+ return parent::pkeyColsClass(get_called_class());
+ }
+
/**
* Get multiple items from the database by key
*
{
if (is_null($v)) {
$v = $k;
- $keys = self::pkeyCols($cls);
+ $keys = static::pkeyCols();
if (count($keys) > 1) {
// FIXME: maybe call pkeyGetClass() ourselves?
throw new Exception('Use pkeyGetClass() for compound primary keys');
return $query;
}
- static function pkeyCols($cls)
+ static function pkeyColsClass($cls)
{
$i = new $cls;
$types = $i->keyTypes();
$pkeyMap = array_fill_keys($keyVals, array());
$result = array_fill_keys($keyVals, array());
- $pkeyCols = self::pkeyCols($cls);
+ $pkeyCols = static::pkeyCols();
$toFetch = array();
$allPkeys = array();