2.10.2.5.9. JPQL Comparison Expressions

The syntax for the use of comparison expressions in a conditional expression is as follows:

  • comparison_expression ::= string_expression comparison_operator {string_expression | all_or_any_expression} | boolean_expression { =| } {boolean_expression | all_or_any_expression} | enum_expression { =| } {enum_expression | all_or_any_expression} | datetime_expression comparison_operator {datetime_expression | all_or_any_expression} | entity_expression { = | } {entity_expression | all_or_any_expression} | arithmetic_expression comparison_operator {arithmetic_expression | all_or_any_expression} | entity_type_expression { = | } entity_type_expression}

  • comparison_operator ::= = | | = | | = |

Examples:

item.cost * 1.08 = 100.00
CONCAT(person.lastName, ‘, ’, person.firstName)) = ‘Jones, Sam’
TYPE(e) = ExemptEmployee
Note

Comparisons over instances of embeddable class types are not supported.