Error when switching filter operator

I have come across an error that occurs after switching the operator on a simple filter. This may be related to and caused by the same core problem as the issue discussed here: Saved Parameter Values Cleared Out When Changing Operator - #7 от пользователя iskandarov - CUBA.Platform but is ultimately a different problem.

The issue arises when changing the parameter type from one operator to another and then running the filter. Steps to reproduce in the attached sample project:

  1. Open the Work Order Browse screen.
  2. Select the “By District” filter.
  3. Immediately change the operator type from “Not In” to “In”
  4. Populate the parameter with a value.
  5. Run the filter

I am consistently getting this error when performing the above steps:

*JPQLException: *
*Exception Description: Problem compiling [select e from datetimesample_WorkOrder e where in :component_filter_district66743 order by e.start]. *
[47, 72] The state field path ‘’ cannot be resolved to a valid type.
[47, 60] The identification variable ‘districtYGgey’ is not defined in the FROM clause.

We are currently running Cuba Version 7.1.3.

Thank you,
Corey Amoruso (111.3 KB)

Thank you for reporting the problem.
I have reproduced it on Platform 7.1.5 and 7.2.4 too. Here is the issue.


I have gotten a chance to test the provided fix. It does not seem to have worked. I confirmed I pulled the latest Cuba version 7.1.8 into my project but am seeing the same behavior.

Upon further analysis it appears the condition in the PropertyCondition.entityAlias is reset to the proper normal expression however the saved variable of entityAlias does not. Looking through the Git history for this fix the issue was properly identified however the implemented fix does not correct the entityAlias variable but instead attempts to reset the PropertyCondition.entityAlias value.

Here is the upgraded sample project running Cuba 7.1.8. (110.5 KB)

Thank you for reporting the problem.
An issue has been created