Hello. I have a class Thing that contains OneToMany list of classes Photo. Photo contains
@Lob @Basic(fetch = FetchType.LAZY) private byte[] content;
And after some queries with Thing (but without loading content of the photos) I get java.lang.OutOfMemoryError: Java heap space (the server is started with -Xmx4096M). Heap dump shows that there are very much space is used by contents of the photos despite of using fetch = FetchType.LAZY. How can I fix this memory issue?