summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorChristophe.Boulain <>2009-03-16 10:41:42 +0000
committerChristophe.Boulain <>2009-03-16 10:41:42 +0000
commit306c8f71af808b0002008a5585c2ac9ff69aeb1e (patch)
treea1e4a083250a15bd2a3073abb3ed2344085fa356 /framework
parent19652f245a2dde0e8ac7a6be57748384f8edcc51 (diff)
Fixed Issue#99
Diffstat (limited to 'framework')
-rw-r--r--framework/Data/ActiveRecord/TActiveRecordGateway.php2
-rw-r--r--framework/Data/DataGateway/TDataGatewayCommand.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/framework/Data/ActiveRecord/TActiveRecordGateway.php b/framework/Data/ActiveRecord/TActiveRecordGateway.php
index 6cce9eb9..e588b976 100644
--- a/framework/Data/ActiveRecord/TActiveRecordGateway.php
+++ b/framework/Data/ActiveRecord/TActiveRecordGateway.php
@@ -349,7 +349,7 @@ class TActiveRecordGateway extends TComponent
$tableInfo->getTableFullName(), $name);
}
if($column->getIsPrimaryKey())
- $primary[] = $value;
+ $primary[$name] = $value;
else
$values[$name] = $value;
}
diff --git a/framework/Data/DataGateway/TDataGatewayCommand.php b/framework/Data/DataGateway/TDataGatewayCommand.php
index 35e4dcbe..7425e6c4 100644
--- a/framework/Data/DataGateway/TDataGatewayCommand.php
+++ b/framework/Data/DataGateway/TDataGatewayCommand.php
@@ -276,7 +276,7 @@ class TDataGatewayCommand extends TComponent
{
$column = $this->getTableInfo()->getColumn($key)->getColumnName();
$criteria[] = $column.' = :'.$key;
- $bindings[$key] = $values[$i++];
+ $bindings[$key] = isset($values[$key])?$values[$key]:$values[$i++];
}
return array(implode(' AND ', $criteria), $bindings);
}