7 Replies Latest reply on Jul 28, 2009 7:31 AM by Adam Warski

    Problem with AuditQuery + @OneToMany and FetchType.EAGER

    Stephan Oudmaijer Newbie

      Hi there,

      I have a problem with a @OneToMany relation that I defined as EAGER but seems to be loaded Lazy when I try to read it with an AuditQuery.

      I have an Order class with the following relation:

      public class Order {
      @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER)
      private List<OrderItem> orderItem;

      When I query for the history of the Order everything works fine, but the orderItem collection is fetched Lazily.

      Is this behaviour correct? Can`t imagine....