0 Replies Latest reply on Jan 12, 2006 3:00 PM by silviu.marcu

    @OrderBy for inheritance JOINED

      I have:

      @Entity
      @Inheritance(strategy = InheritanceType.JOINED)
      class A {
      int id;
      int x;
      }

      @Entity
      @Inheritance(strategy = InheritanceType.JOINED)
      class B extends A {
      }

      @Entity
      class C {
      @OneToMany (cascade = {CascadeType.ALL}, fetch = FetchType.LAZY,
      mappedBy = "c")
      @OrderBy("x")
      public Collection getBs() {
      return bs;
      }
      }

      THE orderBy it crashes : message the table B does not contain x column.

      any solutions to orderBy using an inherited field ?