5 Replies Latest reply on Sep 6, 2010 11:40 AM by andyxr

    EntityQuery needs to find implementors of a specific interface

      Hi,
      Simple one this (I hope).
      I have a concrete class A that implements interface I.
      Class A is annotated with @Entity etc.


      I need to write an EntityQuery that queries for all instances of I:
      public class MyQuery extends EntityQuery<I> {..


      However, if I override the getEjbql() method to do the following:
      return "SELECT i FROM I";


      then Seam complains.
      My main question is this: if I have several @Entity classes, all implementing the same interface, how can I create an EntityQuery that will find and return instances that are of the type I?