Random thought for the day...
Having done some experiments with hibernate mappings set up to do lazy loading of relationships and seen that you have to have an active session to load the children, I was wondering why the proxy objects don't have inbuilt code to get the session, lock the parent and retrieve the child objects.
Is this a totally nonsense idea?
I did also wonder whether an alternative would be to use AOP to add the object locking code, triggered by a call to the getChildXXX() methods.
Regards
Chris
|