gavin wrote:
You realize what an incredibly bad idea this is?
ie, you will end up fetching your entire database during serialization, and all one-row-at-a-time, using piecemeal little SQL SELECTs.
No, I won't. For two reasons.
Firstly, I do not have proxy collections. Only many-to-one references will be instantiated, so the database will only be followed at most to the top of the chain (a parent object).
Secondly, the stream itself knows when to stop following the chain for the dataset being transfered.
My solution is already implemented and working fine (no it doesn't retrieve the entire database), I am simply asking for a feature that would be useful in general and in particular make it so I don't have to worry about maintaining a bunch of code I had to create just to work around the impossibility of extending CGLIBLazyInitializer.