if (!array_key_exists($col, $vals)) {
continue;
} elseif (is_null($vals[$col])) {
- throw new ServerException("NULL values not allowed in getByPK for column '{$col}'");
+ throw new ServerException("NULL values not allowed in getByKeys for column '{$col}'");
}
$object->$col = $vals[$col];
}
static function getByID($id)
{
if (empty($id)) {
- throw new ServerException('Empty ID on lookup');
+ throw new EmptyIdException(get_called_class());
}
// getByPK throws exception if id is null
// or if the class does not have a single 'id' column as primary key