summaryrefslogtreecommitdiff
path: root/framework/Data/DataGateway/TDataGatewayCommand.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Data/DataGateway/TDataGatewayCommand.php')
-rw-r--r--framework/Data/DataGateway/TDataGatewayCommand.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/framework/Data/DataGateway/TDataGatewayCommand.php b/framework/Data/DataGateway/TDataGatewayCommand.php
index 7425e6c4..e290f457 100644
--- a/framework/Data/DataGateway/TDataGatewayCommand.php
+++ b/framework/Data/DataGateway/TDataGatewayCommand.php
@@ -148,7 +148,8 @@ class TDataGatewayCommand extends TComponent
$ordering = $criteria->getOrdersBy();
$limit = $criteria->getLimit();
$offset = $criteria->getOffset();
- $command = $this->getBuilder()->createFindCommand($where,$parameters,$ordering,$limit,$offset);
+ $select = $criteria->getSelect();
+ $command = $this->getBuilder()->createFindCommand($where,$parameters,$ordering,$limit,$offset,$select);
$this->onCreateCommand($command, $criteria);
return $command;
}
@@ -232,7 +233,7 @@ class TDataGatewayCommand extends TComponent
throw new TDbException('dbtablegateway_missing_pk_values',
$this->getTableInfo()->getTableFullName());
}
- if($count>1 && !is_array($values[0]))
+ if($count>1 && (!isset($values[0]) || !is_array($values[0])))
$values = array($values);
if($count > 1 && count($values[0]) !== $count)
{