Skip to content

Commit 499121b

Browse files
committed
Validation::is_unique() DataMapper bug fixed.
1 parent 537a08b commit 499121b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/Validation/ValidationRulesTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public function is_unique($data, $column, $schemaID = null): bool
3737
$query->where($column, $data, '=');
3838
$dataMapper = $this->db->getDataMapper();
3939
$mapper = clone $dataMapper;
40+
$mapper->getParameters(); // Prev parameters reset.
4041
$mapper->persist($query->readQuery(), []);
4142
return $mapper->numRows() < 1;
4243
}

0 commit comments

Comments
 (0)