title: hibernate not eagerly loading @any assosciations
body: <p>I am not able to eagerly load the polymorphic associated objects in hibernate. I understand the default FetchType is Eager for @Any, but I can't eagerly load the fields. Here's a code snippet:</p>
  
  <pre><code>@Entity
  public class ActionTemplate {
  
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Long id;
  @Any(metaColumn = @Column(name ="protocol_type"),fetch = 
  FetchType.EAGER)
  @AnyMetaDef(idType = "long",metaType = "string",metaValues = {@MetaValue(targetEntity = Http.class,value = "http")})
  @JoinColumn(name = "protocol_id")
  @Cascade({org.hibernate.annotations.CascadeType.ALL})
  private ActionProtocol protocol;
  }
  
  public interface ActionProtocol {
  ProtocolType getType();
  }
  
  
  @Entity
  public class Http implements ActionProtocol{
              //some data fields and methods
  }
  </code></pre>
  
  <p>I get lazy initialization exception when I fetch it by id from hibernate. I am not able to understand why is this happening. Can anyone please help ?</p>