Scenario - User table contains createdBy (userId) column which is lazy loaded.
When I fetch the list of users, some objects show as lazy into the main list of user's fetched. When I checked, found that objects which are loaded lazily are present as createdBy (lazily loaded) into some other user object into the main list.
I have attached screenshots to explain in more detail. The first screenshot shows created by as a user object (lazy). The second screenshot shows same user object as lazy even though when it is under the main list of user's fetched.-------1st image-----Lazy nested object as createdBy -----2 nd image ----- lazy main object when the same object is lazy in nested one Please help.
what happen is lets say i have 3 users is my table named A,B and C. A is created by B. while Now User object have createdBy field which is lazy loaded. When i fetch my users from DB using hibernate, I get user A (actual object), B(lazy object), C(actual object). When i checked i found I get B as lazy bcoz B is also present in Object A as createdBy Field and it is lazy there.