Commit 0f234df9 authored by Carsten  Rose's avatar Carsten Rose
Browse files

B8571 Primary Key: report error if lower/uppercase don't match - in general if...

B8571 Primary Key: report error if lower/uppercase don't match - in general if given primary key is not found in table definition.
parent 92b3fab7
Pipeline #1990 passed with stages
in 2 minutes and 45 seconds
......@@ -8,8 +8,6 @@
namespace qfq;
use qfq;
//use qfq\Report;
//use qfq\BuildFormPlain;
......@@ -465,6 +463,11 @@ class QuickFormQuery {
$tableDefinition = $this->dbArray[$this->dbIndexData]->getTableDefinition($this->formSpec[F_TABLE_NAME]);
$this->store->fillStoreTableDefaultColumnType($tableDefinition);
// Check if the defined column primary key exist.
if ($this->store::getVar($this->formSpec[F_PRIMARY_KEY], STORE_TABLE_COLUMN_TYPES) === false) {
throw new UserFormException("Primary Key '" . $this->formSpec[F_PRIMARY_KEY] . "' not found in table " . $this->formSpec[F_TABLE_NAME], ERROR_INVALID_OR_MISSING_PARAMETER);
}
switch ($this->formSpec['render']) {
case 'plain':
$build = new BuildFormPlain($this->formSpec, $this->feSpecAction, $this->feSpecNative, $this->dbArray);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment