I need an advice
I have a rmi server where I do all about connection with hibernate
The problem was that the rmi client send to me a hibernate exception,
Finally, I found out that the "many to one" map should set "lazy=False"
the question is:
Is it risky to work like this?
It isn't recommendable because if you have a lot of collections in an object
and you want to list them, you surely have to work with all the information when you really want to work with the object that you need
In this case use a querystring:
LEFT JOIN FETCH
It isn't risky.
You have to know what are you doing.
When you write "lazy=false" you are telling it that when it saves an object, saves their properties too (in your case a collection)
The potential problem is the performance