HI all,
I understand the basics of these two, I have two entities with 1-n relationship, in my first entity I have
@OneToMany(cascade = CascadeType.ALL,mappedBy = "trGuia",fetch = FetchType.LAZY)
private List<TRItem> itemsList;
but I get {IndirectList: not instantiated} when I call for the entity1.getItemsList();
if I chage to
@OneToMany(cascade = CascadeType.ALL,mappedBy = "trGuia",fetch = FetchType.EAGER)
private List<TRItem> itemsList;
It works but eager loads everything even if the client doesn't need it, how should I use lazy so I get better performance and the list Items
I am looking for? or I must eager?
thanks!