Support HQL BETWEEN predicate

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: Query
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Hibernate User Guide relevant section: https://docs.jboss.org/hibernate/orm/6.6/userguide/html_single/Hibernate_User_Guide.html#hql-between-predicate

      HQL example:

      from Book where price between 1.0 and 100.0 

      The HQL BETWEEN predicate can be translated to MQL using $lte and $gte.

      E.g. an aggregation match stage corresponding to the above HQL might be:

      {
        "$match": {
          "$and": [
            {
              "price": {
                "$gte": 1.0
              }
            },
            {
              "price": {
                "$lte": 100.0
              }
            }
          ]
        }
      }

      This is a ternary operator so if field value is NULL.

      There is a negation flavour (e.g. from Book where price not between 1.0 and 100.0 ) of this predicate we need to cover as well

            Assignee:
            Unassigned
            Reporter:
            Jeffrey Yemin
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: