Hi,
I want to query some data from the database, manipulate it a bit and display it. The problem is the objects are in persistent state after the query and hibernate starts trying to update the database (getting an exception because I set login rights to readonly).
So I used transaction.commit() right after the query so hopefully the objects are in detached state and I will change them and throw away the changes. But now I get a bunch of lazy evaluation exceptions because I didn't join fetch all the sets. If I join fetch everything that I need the query takes ages to execute.
What can I do?
|