Skip to content

Commit

Permalink
Fix issue propelorm#791
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianoc72 committed Nov 22, 2014
1 parent c13ca73 commit 3094f64
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function validate($value, Constraint $constraint)
$className = $this->context->getClassName();
$tableMap = $className::TABLE_MAP;
$queryClass = $className . 'Query';
$filter = sprintf('filterBy%s', $tableMap::translateFieldName($this->context->getPropertyName(), TableMap::TYPE_CAMELNAME, TableMap::TYPE_PHPNAME));
$filter = sprintf('filterBy%s', $tableMap::translateFieldName($this->context->getPropertyName(), TableMap::TYPE_FIELDNAME, TableMap::TYPE_PHPNAME));

if (0 < $queryClass::create()->$filter($value)->count()) {
$this->context->addViolation($constraint->message);
Expand Down

0 comments on commit 3094f64

Please sign in to comment.