Support HQL in / not in

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Critical - P2
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Suppose for the following entity which contains an array field (`tags`):

      @Entity
      @Table(name = "movies")
      public class Movie {
          @Id
          int id;
          String title;
          List<String> tags;
      }

      When it comes to array filtering, we have at least two options:

      • array function
      • HQL's `in` and `not in` feature

      https://jira.mongodb.org/browse/HIBERNATE-63 has been created to implement two basic functions.

      This PR aims to solve the second option. For instance, the following HQL should work as expected (internally it could be translated into comparison operator using `$in` and `$nin`):

      from Movie m where :tag in m.tags

      or

      from Movie m where :tag not in m.tags

       

              Assignee:
              Unassigned
              Reporter:
              Nathan Xu
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: