Browse Source

Skiping marshalling of properties that do not pass validation

Jose Lorenzo Rodriguez 11 years ago
parent
commit
6953d13aba
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/ORM/Marshaller.php

+ 3 - 0
src/ORM/Marshaller.php

@@ -124,6 +124,9 @@ class Marshaller {
 		$primaryKey = $schema->primaryKey();
 		$properties = [];
 		foreach ($data as $key => $value) {
+			if (!empty($errors[$key])) {
+				continue;
+			}
 			$columnType = $schema->columnType($key);
 			if (isset($propertyMap[$key])) {
 				$assoc = $propertyMap[$key]['association'];