summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--framework/Data/ActiveRecord/TActiveRecordGateway.php2
-rw-r--r--framework/Data/DataGateway/TDataGatewayCommand.php2
3 files changed, 3 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index 63e64c02..6f9bf3bc 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2,6 +2,7 @@ Version 3.1.5 (to be released)
BUG: URL wildcard patterns didn't work with subfolders
BUG: Issue#87 - TinyMCE : empty string disapears after encoding JS, that's a problem! (Christophe)
BUG: Issue#96 - THttpResponse::redirect don't send status code (Christophe)
+BUG: Issue#99 - TActiveRecord::save(): confusion with order of keys in table/index (Christophe)
BUG: Issue#107 - typo in TDbConnection::getCharset() (Christophe)
BUG: Issue#127 - TDataSourceConfig::findConnectionByID try to access private var (Cristophe)
BUG: Issue#129 - TDbLogRoute::init don't close the sql command (Christophe)
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);
}