diff --git a/CHANGELOG.md b/CHANGELOG.md index 5096f01..792e3d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,9 @@ RepositoryRegistry and inject the appropriate factory plus DataStore / FeatureTy DataStoreService and FeatureTypeService classes are and will remain incompatible with Symfony 4. +## 0.1.30 +* Fix errors saving boolean values into numeric column (convert to 0 or 1) + ## 0.1.29 * Re-add support for explicitly preconfiguring source table srid on FeatureType; only used if detection fails (e.g. views using geometry expressions) diff --git a/Component/Meta/TableMeta.php b/Component/Meta/TableMeta.php index 97380c0..9d56e97 100644 --- a/Component/Meta/TableMeta.php +++ b/Component/Meta/TableMeta.php @@ -48,6 +48,8 @@ public function prepareUpdateData(array $data) if ($column->isNumeric() && !\is_numeric(trim($value))) { $data[$columnName] = $column->getSafeDefault(); } + } elseif (\is_bool($value) && $this->getColumn($columnName)->isNumeric()) { + $data[$columnName] = $value ? 1 : 0; } } return $data;