Toshiya Kobayashi created DROOLS-5924:
-----------------------------------------
Summary: String vs Number Coercion behavior difference between standard-drl
and exec-model
Key: DROOLS-5924
URL:
https://issues.redhat.com/browse/DROOLS-5924
Project: Drools
Issue Type: Bug
Components: core engine, executable model
Affects Versions: 7.47.0.Final
Reporter: Toshiya Kobayashi
Assignee: Toshiya Kobayashi
If there is a constraint to compare String with Number, standard-drl (MvelConstraint)
coerces String to Number so the evaluation will be Number comparison (e.g. 10 > 5). But
exec-model coerces Number to String so the evaluation will be String comparison (e.g.
"10" < "5").
Note that we need to use a Map to test this because simple comparison String vs Number
causes a compilation error.
for example)
{noformat}
$map : Map()
p : Cheese(type < $map.get("key"))
{noformat}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)