when
$v:drools.issues.model.vehicles.GasolineVehicle(motor.highOctane == true, score<=1, $v.motor.serialNumber > 50000)
and
when
$v:drools.issues.model.vehicles.GasolineVehicle(motor.highOctane == true, score<=1, motor.serialNumber > 50000)
don't behave the same. Strangely enough, only motor.serialNumber > 50000 has an effect, qualifying or un-qualifying the other clauses do not make any difference.
Also, only happens with the dynamically generated model. In the process of #5925 I added identical test for both dynamic (byte-buddy) and normally-compiled code, and there was no difference in that issue, but in this one there is.
In the second one (java compiled code), the $v can be added/removed with no issue. In the first one (byte-buddy model, currently $v.motor.serialNumber > 50000 is used - and the test pass. If $v. is removed from that clause, the test does not pass.
Description
While testing #5925 I identified a case in which:
and
don't behave the same. Strangely enough, only
motor.serialNumber > 50000
has an effect, qualifying or un-qualifying the other clauses do not make any difference.Also, only happens with the dynamically generated model. In the process of #5925 I added identical test for both dynamic (byte-buddy) and normally-compiled code, and there was no difference in that issue, but in this one there is.
How to reproduce
This test https://github.com/flozano/drools-issues/blob/main/src/test/java/drools/issues/DynamicClassTest.java Uses these two DRL files:
In the second one (java compiled code), the $v can be added/removed with no issue. In the first one (byte-buddy model, currently
$v.motor.serialNumber > 50000
is used - and the test pass. If$v.
is removed from that clause, the test does not pass.(https://github.com/flozano/drools-issues/commit/3f9c53172e9998905b0ed9e82ce449edda544f2d)