Commit 6ca8343f authored by François Agneray's avatar François Agneray
Browse files

#49 => done

parent 3990b97b
Pipeline #2220 passed with stages
in 2 minutes and 58 seconds
......@@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- #41: The client_url field must be optional in the InstanceListAction when the user adding a new instance in the metamodel
- #43: The json operator works with PostgreSQL databases
- #49: LIKE and NOT LIKE didn't work with an attribut type numeric
### Security
- In case of vulnerabilities.
\ No newline at end of file
......@@ -51,6 +51,6 @@ class Like extends Operator
*/
public function getExpression(): string
{
return $this->expr->like($this->column, $this->expr->literal('%' . $this->value . '%'));
return $this->expr->like('CAST(' . $this->column . ' AS text)', $this->expr->literal('%' . $this->value . '%'));
}
}
......@@ -51,6 +51,9 @@ class NotLike extends Operator
*/
public function getExpression(): string
{
return $this->expr->notLike($this->column, $this->expr->literal('%' . $this->value . '%'));
return $this->expr->notLike(
'CAST(' . $this->column . ' AS text)',
$this->expr->literal('%' . $this->value . '%')
);
}
}
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