3 Replies Latest reply on Feb 6, 2006 7:19 AM by Dan Liu

    Query against @CollectionOfElements

    Dan Liu Apprentice

      I have an entity:

      class MyClass{
      ...
      @CollectionOfElements
      public Set getNumbers() {
      return numbers;
      }
      }

      now I wanna query from this field:
      "select m from MyClass as m where m.numbers = '07887234234' "
      but it gives me an error. is there any way to query it this way, for example:
      "select m from MyClass as m where m.numbers contains '07887234234' "
      or
      "select m from MyClass as m where m.numbers.itemvalue = '07887234234' "